X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=debian%2Fget-orig-source;h=c990c05ede47f1c19d3a361436e6c713bc274564;hb=3b45e98059a6786ced3fcce450bb177adbb18bbb;hp=35cca88cb7baa551231fe0fec11879710eb2f8c4;hpb=e9d967019b43a81e05068034e1864b7bf0a8a229;p=ion3.git diff --git a/debian/get-orig-source b/debian/get-orig-source index 35cca88..c990c05 100755 --- a/debian/get-orig-source +++ b/debian/get-orig-source @@ -2,6 +2,9 @@ set -e +PACKAGE="$(dpkg-parsechangelog | sed 's/^Source: //; t; d')" +test -n "$PACKAGE" + # Get the main upstream tarball URL and version via uscan. while read line; do if [ "${line#http://}" != "$line" -a "${line#* }" = "$line" ]; then @@ -31,9 +34,9 @@ test -z "$(tar tzf $doc_file | grep -v "^$doc_dir/")" # Unpack, combine and repack. tar xzf $main_file tar xzf $doc_file -mv $main_dir ion3-$version.orig -mv $doc_dir ion3-$version.orig/doc -tar cf - ion3-$version.orig | gzip -c9 > ion3_$version.orig.tar.gz +mv $main_dir $PACKAGE-$version.orig +mv $doc_dir $PACKAGE-$version.orig/doc +tar cf - $PACKAGE-$version.orig | gzip -c9 > $PACKAGE_$version.orig.tar.gz # Clean up. -rm -rf $main_file $doc_file ion3-$version.orig +rm -rf $main_file $doc_file $PACKAGE-$version.orig