Imported Debian patch 0.12.7-3
[bowtie.git] / debian / get-orig-source
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100644 (file)
index 0000000..a61aacb
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+# script to download and repack source package of bowtie which comes in zip format
+
+PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+VERSION=`uscan --verbose --force-download | \
+    grep "Newest version on remote site is .* local version is .*" | \
+    head -n 1 | \
+    sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
+
+mkdir -p ../tarballs
+cd ../tarballs
+
+UPSTREAMDIR=${PKG}-${VERSION}
+unzip ../"${UPSTREAMDIR}-src.zip"
+
+## remove copy of SeqAn library - unfortunately the package does not compile
+## with the Debian packaged version 1.2
+#rm -rf "${UPSTREAMDIR}"/SeqAn-1.1
+
+GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION".orig.tar.gz "${UPSTREAMDIR}"
+rm -rf "${UPSTREAMDIR}"
+