packages: luakit/luakit.spec - %bcond_with git: ugly hack to build the newe...

pawelz pawelz at pld-linux.org
Sat Oct 16 01:52:07 CEST 2010


Author: pawelz                       Date: Fri Oct 15 23:52:07 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- %bcond_with git: ugly hack to build the newest git version

---- Files affected:
packages/luakit:
   luakit.spec (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: packages/luakit/luakit.spec
diff -u packages/luakit/luakit.spec:1.11 packages/luakit/luakit.spec:1.12
--- packages/luakit/luakit.spec:1.11	Fri Sep 24 11:49:53 2010
+++ packages/luakit/luakit.spec	Sat Oct 16 01:52:02 2010
@@ -1,9 +1,18 @@
 # $Revision$, $Date$
+
+%bcond_with	git		# fetch the newest version from git
+
+%if %{with git}
+%define git_url		%{?luakit_git_url}%{!?luakit_git_url:git://github.com/mason-larobina/luakit}
+%define git_branch	%{?luakit_git_branch}%{!?luakit_git_branch:develop}
+%endif
+
+%define		rel	1
 Summary:	WebKitGTK+ based browser
 Summary(hu.UTF-8):	WebKitGTK+ alapú böngésző
 Name:		luakit
 Version:	2010.09.24
-Release:	1
+Release:	%{rel}%{?with_git:.git.%(date +%s)}
 License:	GPL v3
 Group:		Applications
 Source0:	http://github.com/mason-larobina/luakit/tarball/%{version}/%{name}-%{version}.tar.gz
@@ -11,6 +20,7 @@
 Patch0:		%{name}-make.patch
 Patch1:		%{name}-shebang.patch
 URL:		http://luakit.org
+%{?with_git:BuildRequires:	git-core}
 BuildRequires:	glib-devel
 BuildRequires:	gtk+2-devel
 BuildRequires:	gtk-webkit-devel
@@ -34,22 +44,31 @@
 nyelven bővíthető.
 
 %prep
+%if %{without git}
 %setup -qc
 mv mason-larobina-%{name}-*/* .
+%else
+%setup -Tc
+git clone %{git_url} luakit.git
+cd luakit.git; git checkout %{git_branch}; cd -
+mv luakit.git/* .
+%endif
 
+%if 0%{!?luakit_patched:1}
 %patch0 -p1
 %patch1 -p1
+%endif
 
 %build
 CFLAGS='%{rpmcflags}' \
 LDFLAGS='%{rpmldflags}' \
-PREFIX=%{_prefix} \
-%{__make}
+%{__make} \
+	PREFIX=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-PREFIX=%{_prefix} \
 %{__make} install \
+	PREFIX=%{_prefix} \
 	DESTDIR=$RPM_BUILD_ROOT
 
 find $RPM_BUILD_ROOT
@@ -76,6 +95,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12  2010/10/15 23:52:02  pawelz
+- %bcond_with git: ugly hack to build the newest git version
+
 Revision 1.11  2010/09/24 09:49:53  pawelz
 - dropped BR: gperf
 - BR: lua51 (it is used directly in build-process)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/luakit/luakit.spec?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list