[packages/gnscd] include script which to checkout source
glen
glen at pld-linux.org
Tue Sep 4 21:22:52 CEST 2012
commit cf0911279c2cbdd61440802222be6bbfdf462cc4
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Sep 4 22:22:43 2012 +0300
include script which to checkout source
get-source.sh | 21 +++++++++++++++++++++
gnscd.spec | 5 +++--
2 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/gnscd.spec b/gnscd.spec
index b664450..6a9550d 100644
--- a/gnscd.spec
+++ b/gnscd.spec
@@ -18,7 +18,8 @@ Source1: nscd.init
Source2: nscd.sysconfig
Source3: nscd.logrotate
Source4: nscd.conf
-Source6: nscd.tmpfiles
+Source5: nscd.tmpfiles
+Source6: get-source.sh
URL: https://code.google.com/p/gnscd/
BuildRequires: sed >= 4.0
Provides: group(nscd)
@@ -74,7 +75,7 @@ echo '.so man8/nscd.8' > $RPM_BUILD_ROOT%{_mandir}/man8/nscd.8
cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nscd
cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
-cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
: > $RPM_BUILD_ROOT/var/log/nscd
%clean
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..923d9d2
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+
+p=gnscd
+svn=http://$p.googlecode.com/svn/trunk
+
+revno=$1
+specfile=$p.spec
+
+set -e
+svn co $svn${revno:+@$revno} $p
+svnrev=$(svnversion $p)
+tar -cjf $p-$svnrev.tar.bz2 --exclude-vcs $p
+../dropin $p-$svnrev.tar.bz2
+
+sed -i -e "
+ s/^\(%define[ \t]\+svnrev[ \t]\+\)[0-9]\+\$/\1$svnrev/
+" $specfile
+../md5 $p.spec
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gnscd.git/commitdiff/cf0911279c2cbdd61440802222be6bbfdf462cc4
More information about the pld-cvs-commit
mailing list