summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-09-29 13:45:17 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-09-29 13:45:17 +0200
commit231011236a9365fddfca4b70eac65cb1f4692383 (patch)
treec190fe2ebb38bd0fc96047d50aedcf89ceabd8f0 /debian
parenta1e7367b4973b43aefed8cb7cec367fdeeff312e (diff)
watch file dealing with waf
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog4
-rwxr-xr-xdebian/repack-waf50
-rw-r--r--debian/watch7
3 files changed, 54 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 5fd852b..8f3a0a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -312,7 +312,3 @@ oregano (0.18-1) unstable; urgency=low
* Wrote man page.
-- Hugo van der Merwe <hugo@mailroom.com> Mon, 16 Oct 2000 17:54:48 +0200
-
-Local variables:
-mode: debian-changelog
-End:
diff --git a/debian/repack-waf b/debian/repack-waf
new file mode 100755
index 0000000..11a29a5
--- /dev/null
+++ b/debian/repack-waf
@@ -0,0 +1,50 @@
+#!/bin/bash -e
+# Repack an upstream tarball, unpacking waf files inside it.
+#
+# Meant to be run by uscan(1) as the "command param", after repacking
+# (if any) by mk-origtargz. So you shouldn't give "repacksuffix" to
+# debian/watch; instead you should set it below; however this should
+# still match the dversionmangle in that file.
+
+repacksuffix="+dfsg.1"
+unwaf_paths=.
+
+# You shouldn't need to change anything below here.
+
+USAGE="Usage: $0 --upstream-version version filename"
+
+test "$1" = "--upstream-version" || { echo >&2 "$USAGE"; exit 2; }
+upstream="$2"
+filename="$3"
+
+source="$(dpkg-parsechangelog -SSource)"
+newups="${upstream}${repacksuffix}"
+basedir="$(dirname "$filename")"
+
+unpack_waf() {
+ local olddir="$PWD"
+ cd "$1"
+ test -x ./waf || return 1
+ ./waf --help > /dev/null
+ mv .waf-*/* .
+ sed -i '/^#==>$/,$d' waf
+ rmdir .waf-*
+ find waf* -name "*.pyc" -delete
+ cd "$olddir"
+}
+
+set -e
+
+mkdir tmp
+pushd tmp
+tar -xzf "../../${source}_${upstream}.orig.tar.gz"
+SUBDIR=`ls`
+cd ${SUBDIR}
+for i in $unwaf_paths; do unpack_waf "$i"; done
+cd ..
+mv ${SUBDIR} "${source}-${newups}"
+GZIP="-9fn" tar -czf "../../${source}_${newups}.orig.tar.gz" "${source}-${newups}"
+rm -rf "${source}-${newups}"
+
+popd
+rm -rf tmp
diff --git a/debian/watch b/debian/watch
index 4e90b35..6499426 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
-version=3
-opts=filenamemangle=s|^.*/archive/v|oregano-| \
- https://github.com/drahnr/oregano/tags .*/archive/v(\d[\d\.]+).tar.gz
+version=4
+opts=dversionmangle=s/\+dfsg\.\d+//,\
+oversionmangle=s/$/\+dfsg\.1/ \
+https://github.com/drahnr/oregano/tags .*/archive/v(\d[\d\.]+).tar.gz debian debian/repack-waf