From a6cf6a4b2c668370cc038405aed2b8e7e3811fe7 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Wed, 18 Aug 2010 13:38:43 +0200 Subject: Substitute the fallacious use of dpkg-vendor in the postinst by build-time distro detection. --- debian/rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 81e1f00..5a2eaf6 100755 --- a/debian/rules +++ b/debian/rules @@ -22,3 +22,15 @@ override_dh_install: ifeq ($(derives_from_ubuntu),yes) install -D -m 644 debian/ubuntu/apport-hook.py $(CURDIR)/debian/foomatic-filters/usr/share/apport/package-hooks/source_foomatic-filters.py endif + + # Prepare the postinst with distro-specific versions + cp debian/foomatic-filters.postinst.in debian/foomatic-filters.postinst +ifeq ($(derives_from_ubuntu),yes) + # We derive from Ubuntu, the ps_accounting default change was made in version 3.0.2-20070719-0ubuntu1 + sed -i -e "s/#MOTHER_DISTRO#/Ubuntu/g" debian/foomatic-filters.postinst + sed -i -e "s/#FF_PS_DEFAULT_CHANGE_VERSION#/3.0.2-20070719-0ubuntu1/g" debian/foomatic-filters.postinst +else + # We derive from Debian, the ps_accounting default change was made in version 4.0.5-1 + sed -i -e "s/#MOTHER_DISTRO#/Debian/g" debian/foomatic-filters.postinst + sed -i -e "s/#FF_PS_DEFAULT_CHANGE_VERSION#/4.0.5-1/g" debian/foomatic-filters.postinst +endif -- cgit v1.2.3