[SCM] x264/master: Do not hard-code the library SONAME anywhere. Instead, read it from the upstream files and regenerate debian/control.
fabian-guest at users.alioth.debian.org
fabian-guest at users.alioth.debian.org
Mon Jan 9 20:26:53 UTC 2012
The following commit has been merged in the master branch:
commit c67ea65fa835fab83f64a77683d32a91dbd6ac2d
Author: Fabian Greffrath <fabian at greffrath.com>
Date: Mon Jan 9 21:26:42 2012 +0100
Do not hard-code the library SONAME anywhere. Instead, read it from the upstream files and regenerate debian/control.
diff --git a/debian/control b/debian/control.in
similarity index 97%
copy from debian/control
copy to debian/control.in
index 37b468e..c4e191f 100644
--- a/debian/control
+++ b/debian/control.in
@@ -47,7 +47,7 @@ Description: video encoder for the H.264/MPEG-4 AVC standard
* parallel encoding on multiple CPUs
* interlaced streams
-Package: libx264-118
+Package: @libx264N@
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
@@ -64,7 +64,7 @@ Package: libx264-dev
Section: libdevel
Architecture: any
Depends:
- libx264-118 (= ${binary:Version}),
+ @libx264N@ (= ${binary:Version}),
${misc:Depends}
Description: development files for libx264
libx264 is an advanced encoding library for creating H.264 (MPEG-4 AVC)
diff --git a/debian/rules b/debian/rules
index c1fd281..ed83fe7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-libx264N := $(shell sed -rn 's/^Package:[[:space:]]*(libx264-[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+libx264N := libx264-$(shell grep '\#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
@@ -17,6 +17,10 @@ DH_INSTALL_FILES = debian/$(libx264N).install \
%:
dh $@ --parallel
+.PHONY: debian/control
+debian/control:
+ sed -e 's/@libx264N@/$(libx264N)/g' $@.in > $@
+
$(DH_INSTALL_FILES):
sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $(subst $(libx264N),libx264N,$@).in > $@
@@ -47,7 +51,7 @@ override_dh_auto_configure:
override_dh_auto_install:
# dh_auto_install phase handled via dh_auto_build.
-override_dh_auto_clean:
+override_dh_auto_clean: debian/control
rm -rf debian/install
$(MAKE) -o config.mak distclean
dh_clean config.mak2 $(DH_INSTALL_FILES)
--
x264 packaging
More information about the pkg-multimedia-commits
mailing list