[SCM] libav-extra/master: Properly set the library paths for multiarch and shared libs in debian/*.install instead of using brace expansion and asterisks.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Wed Jan 25 20:58:12 UTC 2012
The following commit has been merged in the master branch:
commit 59cb06685cf9124e707dd1fca3bd20c8cf834225
Author: Fabian Greffrath <fabian+debian at greffrath.com>
Date: Fri Jan 13 17:07:53 2012 +0100
Properly set the library paths for multiarch and shared libs in debian/*.install instead of using brace expansion and asterisks.
The debian/*.install files for the shared library packages get dynamically
generated at build time with the proper multipath library paths set.
On archs that support optimized shared libraries, the special path to these
libraries for the dynamic linker is also set.
NOTE: This currently only works for *one* additional optimized shared
library per arch!
(cherry picked from commit 7415b3bd0fdb7188c7c5cc8802f92aeb7890a0d3)
Conflicts:
debian/libavcodec-dev.install
debian/libavdevice-dev.install
debian/libavfilter-dev.install
debian/libavformat-dev.install
debian/libavutil-dev.install
debian/libpostproc-dev.install
debian/libswscale-dev.install
debian/rules
diff --git a/debian/confflags b/debian/confflags
index fe2e22a..d411743 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -177,14 +177,16 @@ shared_build_confflags += --disable-static
## specific to arm architectures
# Configuration flags for the optimised shared libraries
+vfp_shlibdir := vfp
vfp_build_confflags += $(confflags)
-vfp_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/vfp
+vfp_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(vfp_shlibdir)
vfp_build_confflags += --enable-shared
vfp_build_confflags += --disable-static
vfp_build_confflags += --extra-cflags="-mfpu=vfp $(float_abi)"
# NB: NEON always implies v7+ and Libav's NEON implementation requires VFP
+neon_shlibdir := neon/vfp
neon_build_confflags += $(confflags)
-neon_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/neon/vfp
+neon_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(neon_shlibdir)
# the NEON pass now requires ubfx which was introduced in armv6t2; we need to
# enable at least armv6t2 for the NEON pass to build, but NEON implies armv7-a
# so pass armv7-a if it's not already enabled
@@ -197,17 +199,19 @@ neon_build_confflags += --disable-static
## i386 architecture specific
# Configuration flags for the optimized shared libraries
+cmov_shlibdir := i686/cmov
cmov_build_confflags += $(confflags)
cmov_build_confflags += $(nooptflags)
-cmov_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/i686/cmov
+cmov_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(cmov_shlibdir)
cmov_build_confflags += --cpu='i686'
cmov_build_confflags += --enable-shared
cmov_build_confflags += --disable-static
## powerpc architecture specific
# Configuration flags for the optimized shared libraries
+altivec_shlibdir := altivec
altivec_build_confflags += $(confflags)
-altivec_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
+altivec_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(altivec_shlibdir)
altivec_build_confflags += --cpu='g4'
altivec_build_confflags += --enable-shared
altivec_build_confflags += --disable-static
@@ -215,8 +219,9 @@ altivec_build_confflags += --enable-altivec
## sparc architecture specific
# Configuration flags for the optimized shared libraries
+vis_shlibdir := v9
vis_build_confflags += $(confflags)
-vis_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/v9
+vis_build_confflags += --shlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(vis_shlibdir)
vis_build_confflags += --cpu='sparc64'
vis_build_confflags += --enable-shared
vis_build_confflags += --disable-static
diff --git a/debian/libavcodec-dev.install b/debian/libavcodec-dev.install
deleted file mode 100644
index 491521e..0000000
--- a/debian/libavcodec-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libavcodec
-usr/lib/*/libavcodec.a
-usr/lib/*/pkgconfig/libavcodec.pc
-usr/lib/*/{,*/,*/*/}libavcodec.so
diff --git a/debian/libavcodec-dev.install.in b/debian/libavcodec-dev.install.in
new file mode 100644
index 0000000..69ce957
--- /dev/null
+++ b/debian/libavcodec-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libavcodec
+usr/lib/@DEB_HOST_MULTIARCH@/libavcodec.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavcodec.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libavcodec.pc
diff --git a/debian/libavcodec-extra-53.install b/debian/libavcodec-extra-53.install.in
similarity index 100%
rename from debian/libavcodec-extra-53.install
rename to debian/libavcodec-extra-53.install.in
diff --git a/debian/libavcodec53.install b/debian/libavcodec53.install
deleted file mode 100644
index 27da00e..0000000
--- a/debian/libavcodec53.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libavcodec.so.*
diff --git a/debian/libavcodec53.install.in b/debian/libavcodec53.install.in
new file mode 100644
index 0000000..7c69bb0
--- /dev/null
+++ b/debian/libavcodec53.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavcodec.so.*
diff --git a/debian/libavdevice-dev.install b/debian/libavdevice-dev.install
deleted file mode 100644
index 3115322..0000000
--- a/debian/libavdevice-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libavdevice
-usr/lib/*/libavdevice.a
-usr/lib/*/pkgconfig/libavdevice.pc
-usr/lib/*/{,*/,*/*/}libavdevice.so
diff --git a/debian/libavdevice-dev.install.in b/debian/libavdevice-dev.install.in
new file mode 100644
index 0000000..985ce79
--- /dev/null
+++ b/debian/libavdevice-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libavdevice
+usr/lib/@DEB_HOST_MULTIARCH@/libavdevice.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavdevice.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libavdevice.pc
diff --git a/debian/libavdevice-extra-53.install b/debian/libavdevice-extra-53.install.in
similarity index 100%
rename from debian/libavdevice-extra-53.install
rename to debian/libavdevice-extra-53.install.in
diff --git a/debian/libavdevice53.install b/debian/libavdevice53.install
deleted file mode 100644
index 30b41e5..0000000
--- a/debian/libavdevice53.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libavdevice.so.*
diff --git a/debian/libavdevice53.install.in b/debian/libavdevice53.install.in
new file mode 100644
index 0000000..e942547
--- /dev/null
+++ b/debian/libavdevice53.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavdevice.so.*
diff --git a/debian/libavfilter-dev.install b/debian/libavfilter-dev.install
deleted file mode 100644
index 48dd61b..0000000
--- a/debian/libavfilter-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libavfilter
-usr/lib/*/libavfilter.a
-usr/lib/*/pkgconfig/libavfilter.pc
-usr/lib/*/{,*/,*/*/}libavfilter.so
diff --git a/debian/libavfilter-dev.install.in b/debian/libavfilter-dev.install.in
new file mode 100644
index 0000000..716ee90
--- /dev/null
+++ b/debian/libavfilter-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libavfilter
+usr/lib/@DEB_HOST_MULTIARCH@/libavfilter.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavfilter.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libavfilter.pc
diff --git a/debian/libavfilter-extra-2.install b/debian/libavfilter-extra-2.install.in
similarity index 100%
rename from debian/libavfilter-extra-2.install
rename to debian/libavfilter-extra-2.install.in
diff --git a/debian/libavfilter2.install b/debian/libavfilter2.install
deleted file mode 100644
index 1efdd0b..0000000
--- a/debian/libavfilter2.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libavfilter.so.*
diff --git a/debian/libavfilter2.install.in b/debian/libavfilter2.install.in
new file mode 100644
index 0000000..4e4157c
--- /dev/null
+++ b/debian/libavfilter2.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavfilter.so.*
diff --git a/debian/libavformat-dev.install b/debian/libavformat-dev.install
deleted file mode 100644
index 9eed5a0..0000000
--- a/debian/libavformat-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libavformat
-usr/lib/*/libavformat.a
-usr/lib/*/pkgconfig/libavformat.pc
-usr/lib/*/{,*/,*/*/}libavformat.so
diff --git a/debian/libavformat-dev.install.in b/debian/libavformat-dev.install.in
new file mode 100644
index 0000000..a4ee167
--- /dev/null
+++ b/debian/libavformat-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libavformat
+usr/lib/@DEB_HOST_MULTIARCH@/libavformat.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavformat.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libavformat.pc
diff --git a/debian/libavformat-extra-53.install b/debian/libavformat-extra-53.install.in
similarity index 100%
rename from debian/libavformat-extra-53.install
rename to debian/libavformat-extra-53.install.in
diff --git a/debian/libavformat53.install b/debian/libavformat53.install
deleted file mode 100644
index 0a3dc1a..0000000
--- a/debian/libavformat53.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libavformat.so.*
diff --git a/debian/libavformat53.install.in b/debian/libavformat53.install.in
new file mode 100644
index 0000000..660f3a5
--- /dev/null
+++ b/debian/libavformat53.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavformat.so.*
diff --git a/debian/libavutil-dev.install b/debian/libavutil-dev.install
deleted file mode 100644
index 52ca082..0000000
--- a/debian/libavutil-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libavutil
-usr/lib/*/libavutil.a
-usr/lib/*/pkgconfig/libavutil.pc
-usr/lib/*/{,*/,*/*/}libavutil.so
diff --git a/debian/libavutil-dev.install.in b/debian/libavutil-dev.install.in
new file mode 100644
index 0000000..5eeb883
--- /dev/null
+++ b/debian/libavutil-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libavutil
+usr/lib/@DEB_HOST_MULTIARCH@/libavutil.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavutil.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libavutil.pc
diff --git a/debian/libavutil-extra-51.install b/debian/libavutil-extra-51.install.in
similarity index 100%
rename from debian/libavutil-extra-51.install
rename to debian/libavutil-extra-51.install.in
diff --git a/debian/libavutil51.install b/debian/libavutil51.install
deleted file mode 100644
index f89ecbe..0000000
--- a/debian/libavutil51.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libavutil.so.*
diff --git a/debian/libavutil51.install.in b/debian/libavutil51.install.in
new file mode 100644
index 0000000..3dc6cc2
--- /dev/null
+++ b/debian/libavutil51.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libavutil.so.*
diff --git a/debian/libpostproc-dev.install b/debian/libpostproc-dev.install
deleted file mode 100644
index fad0a3c..0000000
--- a/debian/libpostproc-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libpostproc
-usr/lib/*/libpostproc.a
-usr/lib/*/pkgconfig/libpostproc.pc
-usr/lib/*/{,*/,*/*/}libpostproc.so
diff --git a/debian/libpostproc-dev.install.in b/debian/libpostproc-dev.install.in
new file mode 100644
index 0000000..bf4bcb5
--- /dev/null
+++ b/debian/libpostproc-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libpostproc
+usr/lib/@DEB_HOST_MULTIARCH@/libpostproc.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libpostproc.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libpostproc.pc
diff --git a/debian/libpostproc-extra-52.install b/debian/libpostproc-extra-52.install.in
similarity index 100%
rename from debian/libpostproc-extra-52.install
rename to debian/libpostproc-extra-52.install.in
diff --git a/debian/libpostproc52.install b/debian/libpostproc52.install
deleted file mode 100644
index 78d31a1..0000000
--- a/debian/libpostproc52.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libpostproc.so.*
diff --git a/debian/libpostproc52.install.in b/debian/libpostproc52.install.in
new file mode 100644
index 0000000..5c4aee3
--- /dev/null
+++ b/debian/libpostproc52.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libpostproc.so.*
diff --git a/debian/libswscale-dev.install b/debian/libswscale-dev.install
deleted file mode 100644
index 61b171b..0000000
--- a/debian/libswscale-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/libswscale
-usr/lib/*/libswscale.a
-usr/lib/*/pkgconfig/libswscale.pc
-usr/lib/*/{,*/,*/*/}libswscale.so
diff --git a/debian/libswscale-dev.install.in b/debian/libswscale-dev.install.in
new file mode 100644
index 0000000..71eb932
--- /dev/null
+++ b/debian/libswscale-dev.install.in
@@ -0,0 +1,4 @@
+usr/include/libswscale
+usr/lib/@DEB_HOST_MULTIARCH@/libswscale.a
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libswscale.so
+usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/libswscale.pc
diff --git a/debian/libswscale-extra-2.install b/debian/libswscale-extra-2.install.in
similarity index 100%
rename from debian/libswscale-extra-2.install
rename to debian/libswscale-extra-2.install.in
diff --git a/debian/libswscale2.install b/debian/libswscale2.install
deleted file mode 100644
index b403da1..0000000
--- a/debian/libswscale2.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/{,*/,*/*/}libswscale.so.*
diff --git a/debian/libswscale2.install.in b/debian/libswscale2.install.in
new file mode 100644
index 0000000..2ac5f14
--- /dev/null
+++ b/debian/libswscale2.install.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH_OPT@/libswscale.so.*
diff --git a/debian/rules b/debian/rules
index 625f44d..000deea 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,7 @@ BUILT_USING=$(shell dpkg-query --showformat='$${Source} (= $${Version})' --show
SHLIBS_VERSION := 4:0.8-1~
LIB_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|avformat|avfilter|postproc|swscale)(-extra-)?[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+DEV_PKGS := $(shell echo $(LIB_PKGS) | sed 's/[0-9]\+\>/-dev/g')
# Support multiple makes at once
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -22,6 +23,7 @@ endif
endif
include debian/confflags
+OPT_FLAVOR := $(filter-out static shared, $(FLAVORS))
$(info FLAVORS = $(FLAVORS))
$(info DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS))
@@ -32,6 +34,14 @@ $(info BUILT_USING = $(BUILT_USING))
libav/configure:
tar xvf /usr/src/libav-source.tar.gz
+DH_INSTALL_FILES := $(foreach pkg, $(LIB_PKGS) $(DEV_PKGS), debian/$(pkg).install)
+$(DH_INSTALL_FILES):
+ sed 's/@DEB_HOST_MULTIARCH\(_OPT\)\?@/$(DEB_HOST_MULTIARCH)/g' $@.in > $@
+ifneq (,$(OPT_FLAVOR))
+ grep @DEB_HOST_MULTIARCH_OPT@ < $@.in | \
+ sed 's:@DEB_HOST_MULTIARCH_OPT@:$(DEB_HOST_MULTIARCH)/$($(OPT_FLAVOR)_shlibdir):g' >> $@
+endif
+
configure-%: configure-stamp-%
configure-stamp-%: libav/configure
dh_testdir
@@ -65,7 +75,7 @@ clean:
$(addprefix configure-stamp-, $(FLAVORS)) \
build-doxy-stamp
rm -rf $(addprefix debian-, $(FLAVORS)) doxy libav
- dh_clean
+ dh_clean $(DH_INSTALL_FILES)
get-orig-source:
dh_testdir
@@ -78,7 +88,7 @@ define install_flavor
endef
-install: build
+install: build $(DH_INSTALL_FILES)
dh_testdir
dh_testroot
dh_prep
--
libav-extra packaging
More information about the pkg-multimedia-commits
mailing list