From 96fd54b514d893d3cececac69af8d77b0346bf05 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 4 Nov 2007 16:27:19 +0000 Subject: [PATCH] Started renaming. Removed postinst version check from particleman. Changed debian/rules and debian/get-orig-source to get the package name from the changelog. --- debian/get-orig-source | 11 +++++++---- debian/ion3.postrm | 4 ---- debian/rules | 16 ++++++++-------- 3 files changed, 15 insertions(+), 16 deletions(-) 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 diff --git a/debian/ion3.postrm b/debian/ion3.postrm index b0c1812..4952618 100644 --- a/debian/ion3.postrm +++ b/debian/ion3.postrm @@ -1,10 +1,6 @@ #!/bin/sh set -e -if [ "$1" = purge ]; then - rm -rf /etc/X11/ion3 -fi - # i18n menu method inst=/etc/menu-methods/ion3-i18n if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi diff --git a/debian/rules b/debian/rules index f14715a..f7ed172 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,7 @@ export SHELL=/bin/bash include /usr/share/quilt/quilt.make -PACKAGE := ion3 +PACKAGE := $(shell dpkg-parsechangelog | sed -r 's/^Source: //; t; d') PACKAGE_DEV := $(PACKAGE)-dev PACKAGE_DOC := $(PACKAGE)-doc INSTDIR := debian/$(PACKAGE) @@ -86,7 +86,7 @@ binary-indep: build-indep install-indep # automatically keep track of api version echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \ - | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3-dev.substvars + | cpp -P | tail -1 | sed 's/"//g') >>debian/$(PACKAGE_DEV).substvars dh_installchangelogs -i dh_installdocs -i @@ -129,17 +129,17 @@ binary-arch: build-arch install-arch # automatically keep track of api version echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \ - | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3.substvars + | cpp -P | tail -1 | sed 's/"//g') >>debian/$(PACKAGE).substvars dh_installchangelogs -a dh_installdocs -a - rm -f $(INSTDIR)/usr/share/doc/ion3/LICENSE - mv $(INSTDIR)/usr/share/doc/ion3/ChangeLog $(INSTDIR)/usr/share/doc/ion3/changelog + rm -f $(INSTDIR)/usr/share/doc/$(PACKAGE)/LICENSE + mv $(INSTDIR)/usr/share/doc/$(PACKAGE)/ChangeLog $(INSTDIR)/usr/share/doc/$(PACKAGE)/changelog # dh_installexamples -a # dh_install -a dh_installmenu -a - install -m644 debian/ion3.menu-method.i18n \ - $(INSTDIR)/etc/menu-methods/ion3-i18n + install -m644 debian/$(PACKAGE).menu-method.i18n \ + $(INSTDIR)/etc/menu-methods/$(PACKAGE)-i18n dh_installdebconf -a # dh_installlogrotate -a @@ -160,7 +160,7 @@ binary-arch: build-arch install-arch # dh_makeshlibs -a dh_installdeb -a sed -i 's/^DEBIAN_VERSION=/&$(DEBIAN_VERSION)/; s/^UPSTREAM_VERSION=/&$(UPSTREAM_VERSION)/' \ - debian/ion3/DEBIAN/postinst + $(INSTDIR)/DEBIAN/postinst dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a -- 2.39.2