[SCM] rtmpdump/master: Add simple script to prepare release tarballs from upstream's git.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Tue Aug 16 11:22:03 UTC 2011


The following commit has been merged in the master branch:
commit 2c376faacb53d4563f36e1c9e0e95798394d8f3e
Author: Alessio Treglia <alessio at debian.org>
Date:   Tue Aug 16 13:22:46 2011 +0200

    Add simple script to prepare release tarballs from upstream's git.

diff --git a/debian/get-git-source.sh b/debian/get-git-source.sh
new file mode 100755
index 0000000..3c5214b
--- /dev/null
+++ b/debian/get-git-source.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+BASE_REL=$(dpkg-parsechangelog 2>/dev/null | sed -ne 's/Version: \([0-9.]\+\)+\?.*/\1/p')
+OLDDIR=${PWD}
+GOS_DIR=${OLDDIR}/get-orig-source
+GIT_COMMIT='git log --no-color -1 --oneline | cut -d" " -f1'
+GIT_DATE='git log --no-color -1 --date=iso | sed -ne "s/Date:\s\+\(.*\).*/\1/p" | cut -d" " -f1 | tr -d "-"'
+
+if [ -z ${BASE_REL} ]; then
+	echo 'Please run this script from the sources root directory.'
+	exit 1
+fi
+
+
+rm -rf ${GOS_DIR}
+mkdir ${GOS_DIR} && cd ${GOS_DIR}
+git clone git://git.ffmpeg.org/rtmpdump rtmpdump
+cd rtmpdump/
+RTMPDUMP_GIT_COMMIT=$(eval "${GIT_COMMIT}")
+RTMPDUMP_GIT_DATE=$(eval "${GIT_DATE}")
+cd .. && tar cf \
+	${OLDDIR}/rtmpdump_${BASE_REL}+${RTMPDUMP_GIT_DATE}.git${RTMPDUMP_GIT_COMMIT}.orig.tar \
+	rtmpdump --exclude-vcs && gzip -9fn \
+	${OLDDIR}/rtmpdump_${BASE_REL}+${RTMPDUMP_GIT_DATE}.git${RTMPDUMP_GIT_COMMIT}.orig.tar
+rm -rf ${GOS_DIR}
diff --git a/debian/rules b/debian/rules
index d19684d..84d0511 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,5 +12,12 @@ override_dh_auto_build:
 override_dh_auto_install:
 	dh_auto_install -- $(MAKEVARS)
 
+override_dh_auto_clean:
+	rm -rf get-orig-source
+	dh_auto_clean
+
+get-orig-source:
+	debian/get-git-source.sh
+
 %:
 	dh $@ --with quilt

-- 
rtmpdump packaging



More information about the pkg-multimedia-commits mailing list