[SCM] libav/ubuntu: distinguish between debian and ubuntu package builds with dpkg-vendor
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Tue Nov 6 15:02:48 UTC 2012
The following commit has been merged in the ubuntu branch:
commit 9d4c4d01c3e1316544ff53b5b27c77b6cd43e222
Author: Reinhard Tartler <siretart at tauware.de>
Date: Sat Nov 3 13:28:25 2012 +0100
distinguish between debian and ubuntu package builds with dpkg-vendor
The distinction is explained in verbose comments
diff --git a/debian/rules b/debian/rules
index beedb53..e3e4c63 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,12 +6,46 @@ DEB_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -r 's/[^:]+://; s/-[^-]+$$//')
SHLIBS_VERSION := $(EPOCH)9~beta2-1
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
+# In Ubuntu, all -extra- packages are built from a special source
+# package called 'libav-extra', which is found in the universe section
+# of the archive because it requires extra build dependencies that are
+# not found in 'main'
+#
+# In order to ease the transition period when libav is uploaded to the
+# archive and libav-extra is not built yet, all libraries in libav
+# produce -extra variants. However, only libavcodec-extra comes with
+# additional functionality.
+VENDOR := Ubuntu
+
# these package do not build -extra variants
LIB_PKGS :=
# these packages do build -extra variants
LIB_PKGS2 := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|avformat|avresample|avfilter|swscale)[0-9]+)[[:space:]]*$$/\1/p' debian/control)
# these packages are the -extra- variants
-LIB_EXTRA_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|avformat|avfilter|postproc|swscale)(-extra-)[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+LIB_EXTRA_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|avformat|avresample|avfilter|swscale)(-extra-)[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+
+else
+# In Debian, there is no need (anymore) for a separate libav-extra
+# source package. Instead, the libavcodec-extra package is built
+# directly from the 'main' source package.
+#
+# the libavcodec-extra package is necessary because it links against
+# libraries that are GPLv3 licensed. Make sure that you do not link
+# GPLv2 only applications against the libavcodec-extra flavor!
+#
+# Because of the lack of archive skew problems, only libavcodec produces
+# an -extra variant.
+
+VENDOR := Debian
+# these package do not build -extra variants
+LIB_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avdevice|avformat|avfilter|avresample|swscale)[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+# these packages do build -extra variants
+LIB_PKGS2 := $(shell sed -nr 's/^Package:[[:space:]]*(libavcodec[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+# these packages are the -extra- variants
+LIB_EXTRA_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(libavcodec-extra-[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+endif
+
# these are the -dev packages
DEV_PKGS := $(shell echo $(LIB_PKGS) $(LIB_PKGS2) | sed 's/[0-9]\+\>/-dev/g')
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list