[gnash] 01/05: Run dpkg-vendor at build time.

Gabriele Giacone gg0-guest at moszumanska.debian.org
Sat Jan 9 18:57:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

gg0-guest pushed a commit to branch master
in repository gnash.

commit 82b20671e2e8257b256080af1adea9e4269c6697
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date:   Thu Jul 16 02:16:40 2015 +0200

    Run dpkg-vendor at build time.
---
 ...n-gnash.postinst => browser-plugin-gnash.postinst.in} | 11 ++---------
 ...-plugin-gnash.prerm => browser-plugin-gnash.prerm.in} |  7 +------
 debian/changelog                                         |  6 ++++++
 debian/rules                                             | 16 +++++++++++++++-
 4 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/debian/browser-plugin-gnash.postinst b/debian/browser-plugin-gnash.postinst.in
similarity index 76%
rename from debian/browser-plugin-gnash.postinst
rename to debian/browser-plugin-gnash.postinst.in
index 8294ba5..ecc23eb 100644
--- a/debian/browser-plugin-gnash.postinst
+++ b/debian/browser-plugin-gnash.postinst.in
@@ -20,16 +20,9 @@ set -e
 
 case "$1" in
     configure)
-        if dpkg-vendor --derives-from Ubuntu; then
-            ALTLINK=/usr/lib/mozilla/plugins/flashplugin-alternative.so
-            ALTNAME=mozilla-flashplugin
-        else
-            ALTLINK=/usr/lib/mozilla/plugins/flash-mozilla.so
-            ALTNAME=flash-mozilla.so
-        fi
         update-alternatives --quiet --install \
-            $ALTLINK \
-            $ALTNAME \
+            @ALTLINK@ \
+            @ALTNAME@ \
             /usr/lib/gnash/libgnashplugin.so \
            10
     ;;
diff --git a/debian/browser-plugin-gnash.prerm b/debian/browser-plugin-gnash.prerm.in
similarity index 84%
rename from debian/browser-plugin-gnash.prerm
rename to debian/browser-plugin-gnash.prerm.in
index 6694fea..bce8b18 100644
--- a/debian/browser-plugin-gnash.prerm
+++ b/debian/browser-plugin-gnash.prerm.in
@@ -19,13 +19,8 @@ set -e
 
 case "$1" in
     remove|upgrade|deconfigure)
-        if dpkg-vendor --derives-from Ubuntu; then
-            ALTNAME=mozilla-flashplugin
-        else
-            ALTNAME=flash-mozilla.so
-        fi
         update-alternatives --quiet --remove \
-            $ALTNAME \
+            @ALTNAME@ \
             /usr/lib/gnash/libgnashplugin.so
     ;;
 
diff --git a/debian/changelog b/debian/changelog
index 729f54f..3309bbf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gnash (0.8.11~git20150419-3) unstable; urgency=medium
+
+  * Run dpkg-vendor at build time (Closes: #792464).
+
+ -- Gabriele Giacone <1o5g4r8o at gmail.com>  Thu, 16 Jul 2015 02:11:02 +0200
+
 gnash (0.8.11~git20150419-2) unstable; urgency=medium
 
   * Remove gst0.10 build-deps, it doesn't support gst1.0.  Build only
diff --git a/debian/rules b/debian/rules
index 92504c3..767ee91 100755
--- a/debian/rules
+++ b/debian/rules
@@ -56,6 +56,19 @@ ifneq (,$(filter hurd-%,$(DEB_BUILD_ARCH)))
 	CONFIGURE_FLAGS += --disable-jemalloc --enable-sound=none
 endif
 
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
+	ALTLINK=/usr/lib/mozilla/plugins/flashplugin-alternative.so
+	ALTNAME=mozilla-flashplugin
+else
+	ALTLINK=/usr/lib/mozilla/plugins/flash-mozilla.so
+	ALTNAME=flash-mozilla.so
+endif
+INFILES := $(wildcard debian/browser-plugin-gnash.*.in)
+GENERATED := $(INFILES:.in=)
+
+$(GENERATED):
+	sed -e "s#@ALTLINK@#$(ALTLINK)#" -e "s#@ALTNAME@#$(ALTNAME)#" $@.in > $@
+
 override_dh_auto_configure:
 	./autogen.sh
 	mkdir -p $(OBJDIR)
@@ -84,7 +97,7 @@ endif
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
 
-override_dh_auto_install:
+override_dh_auto_install: $(GENERATED)
 	$(MAKE) -C $(OBJDIR) install DESTDIR=$(CURDIR)/debian/tmp
 	$(MAKE) -C $(OBJDIR) install-plugins DESTDIR=$(CURDIR)/debian/tmp
 
@@ -127,6 +140,7 @@ override_dh_auto_clean:
 	rm -f debian/gnash.png $(OUTFILES) compile
 	rm -rf autom4te.cache libltdl $(OBJDIR) 
 	rm -f aclocal.m4 macros/argz.m4 macros/libtool.m4 macros/lt*.m4
+	rm -f $(GENERATED)
 	find . -name Makefile.in -delete
 	dh_clean
 

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-flash/gnash.git



More information about the pkg-flash-devel mailing list