]> git.decadent.org.uk Git - ion3.git/blobdiff - debian/rules
Added get-orig-source script and rule to download and combine both upstream tarballs.
[ion3.git] / debian / rules
index d9c6418426927930b67197327d24d11dcc2eef57..99c822ce18909bf84a7d59443cfb8add5d872366 100755 (executable)
@@ -13,7 +13,8 @@ PACKAGE_DOC := $(PACKAGE)-doc
 INSTDIR := debian/$(PACKAGE)
 INSTDIR_DEV := debian/$(PACKAGE_DEV)
 INSTDIR_DOC := debian/$(PACKAGE_DOC)
-UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: ([0-9]*:)?(.*)-[^-]*$$/\2/; t; d')
+DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: //; t; d')
+UPSTREAM_VERSION := $(shell echo $(DEBIAN_VERSION) | sed -r 's/^[0-9]*://; s/-[^-]*$$//')
 
 doc-orig:
        cp -R doc doc-orig
@@ -109,7 +110,7 @@ binary-indep: build-indep install-indep
 #      dh_installinfo -i
 #      dh_undocumented -i
 #      dh_installman -i
-#      dh_link -i
+       dh_link -i
 #      dh_strip -i
        dh_compress -i
        dh_fixperms -i
@@ -160,7 +161,7 @@ binary-arch: build-arch install-arch
 #      dh_python -a
 #      dh_makeshlibs -a
        dh_installdeb -a
-       sed -i 's/^UPSTREAM_VERSION=/UPSTREAM_VERSION=$(UPSTREAM_VERSION)/' \
+       sed -i 's/^DEBIAN_VERSION=/&$(DEBIAN_VERSION)/; s/^UPSTREAM_VERSION=/&$(UPSTREAM_VERSION)/' \
                debian/ion3/DEBIAN/postinst
        dh_shlibdeps -a
        dh_gencontrol -a
@@ -168,5 +169,10 @@ binary-arch: build-arch install-arch
        dh_builddeb -a
 
 binary: binary-indep binary-arch
+
+get-orig-source:
+       chmod +x debian/get-orig-source
+       debian/get-orig-source
+
 .PHONY: build-indep build-arch build clean binary-indep binary-arch binary \
-       install-indep install-arch unpatch
+       install-indep install-arch unpatch get-orig-source