[packages/xdg-utils] add get-source.sh script to make tarball of git checkout
glen
glen at pld-linux.org
Fri Dec 28 13:06:14 CET 2012
commit 317d93f053a3c56575130c40faac4ab3e8f639e2
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Dec 28 14:05:55 2012 +0200
add get-source.sh script to make tarball of git checkout
get-source.sh | 23 +++++++++++++++++++++++
xdg-utils.spec | 2 +-
2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/xdg-utils.spec b/xdg-utils.spec
index 0593fd5..fcc9011 100644
--- a/xdg-utils.spec
+++ b/xdg-utils.spec
@@ -8,7 +8,7 @@ Release: %{rel}.%{subver}
License: MIT
Group: X11/Applications
#Source0: http://portland.freedesktop.org/download/%{name}-%{version}.tgz
-Source0: xdg-utils-v1.1.0-rc1-71-g050333e.tar.gz
+Source0: %{name}-v%{version}-%{subver}-71-g050333e.tar.gz
# Source0-md5: 7a83a4867afc6f5df896f0be0bace74a
Source1: get-source.sh
URL: http://portland.freedesktop.org/wiki/XdgUtils
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..c667afc
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+PACKAGE=xdg-utils
+
+set -e
+set -x
+
+if [ ! -d $PACKAGE/ ]; then
+ git clone git://anongit.freedesktop.org/git/xdg/xdg-utils $PACKAGE/
+else
+ cd $PACKAGE
+ git pull --rebase
+ cd ..
+fi
+
+export GIT_DIR=$PACKAGE/.git
+VERSION=$(git describe --tags)
+ARCHIVE=$PACKAGE-$VERSION.tar.gz
+
+if [ -e $ARCHIVE ]; then
+ echo >&2 "$ARCHIVE already exists"
+ exit 0
+fi
+git archive master --format tar --prefix=$PACKAGE-$VERSION/ | gzip -9 > $ARCHIVE
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xdg-utils.git/commitdiff/317d93f053a3c56575130c40faac4ab3e8f639e2
More information about the pld-cvs-commit
mailing list