[SCM] libvpx/master: Use dh sequencer and dh-exec for building package
onovy at users.alioth.debian.org
onovy at users.alioth.debian.org
Sun Aug 21 17:14:44 UTC 2016
The following commit has been merged in the master branch:
commit 5fc51cec663b781dc48c04f5959793f3d2b9633d
Author: Ondřej Nový <onovy at debian.org>
Date: Thu Aug 11 16:13:11 2016 +0200
Use dh sequencer and dh-exec for building package
diff --git a/debian/control b/debian/control
index 6b99f90..101349b 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,8 @@ Priority: optional
Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers at lists.alioth.debian.org>
Uploaders: Sebastian Dröge <slomo at debian.org>,
Build-Depends: debhelper (>= 9),
- yasm (>= 0.7) [amd64 i386 hurd-i386 kfreebsd-amd64 kfreebsd-i386]
+ yasm (>= 0.7) [amd64 i386 hurd-i386 kfreebsd-amd64 kfreebsd-i386],
+ dh-exec,
Build-Depends-Indep: doxygen
Standards-Version: 3.9.8
Homepage: http://www.webmproject.org
diff --git a/debian/libvpx-dev.install b/debian/libvpx-dev.install
old mode 100644
new mode 100755
index d5c6082..513ee8e
--- a/debian/libvpx-dev.install
+++ b/debian/libvpx-dev.install
@@ -1,2 +1,5 @@
+#! /usr/bin/dh-exec --with-scripts=subst-multiarch
+builddir/vpx-vp8-*/lib/libvpx.so /usr/lib/${DEB_HOST_MULTIARCH}/
+builddir/vpx-vp8-*/lib/libvpx.a /usr/lib/${DEB_HOST_MULTIARCH}/
builddir/vpx-vp8-*/include/vpx usr/include
builddir/vpx-vp8-*/lib/pkgconfig usr/lib
diff --git a/debian/libvpx-doc.install b/debian/libvpx-doc.install
index e01d72c..86048ed 100644
--- a/debian/libvpx-doc.install
+++ b/debian/libvpx-doc.install
@@ -1 +1 @@
-builddir/vpx-vp8-*/docs/html usr/share/doc/libvpx-doc
+builddir/docs/html usr/share/doc/libvpx-doc
diff --git a/debian/libvpx4.install b/debian/libvpx4.install
new file mode 100755
index 0000000..54c43d9
--- /dev/null
+++ b/debian/libvpx4.install
@@ -0,0 +1,3 @@
+#! /usr/bin/dh-exec --with-scripts=subst-multiarch
+builddir/vpx-vp8-*/lib/libvpx.so.* /usr/lib/${DEB_HOST_MULTIARCH}/
+builddir-neon/vpx-vp8-*/lib/libvpx.so.* /usr/lib/${DEB_HOST_MULTIARCH}/vfp/neon [arm]
diff --git a/debian/rules b/debian/rules
index 964363f..abbfaa6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,8 @@
#!/usr/bin/make -f
+DEB_CFLAGS_MAINT_APPEND = -Wall
+DEB_CXXFLAGS_MAINT_APPEND = -Wall
+
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
@@ -35,8 +38,8 @@ ifeq ($(DEB_HOST_ARCH), armhf)
# now armhf is ARMv7, but ARMv7 in vpx means NEON, which is not mandatory on armhf
# thus we use ARMv6 and -marm (since no thumb2 on ARMv6) to ensure compatability
# with all ARMv7 cores we support.
-CFLAGS += -marm
-CXXFLAGS += -marm
+DEB_CFLAGS_MAINT_APPEND += -marm
+DEB_CXXFLAGS_MAINT_APPEND += -marm
configure_flags += --target=armv6-linux-gcc --enable-small
else
ifeq ($(DEB_HOST_ARCH), amd64)
@@ -57,14 +60,14 @@ else
ifeq ($(DEB_HOST_ARCH), mips)
configure_flags += --target=generic-gnu
# Disable MIPS assembly for now, it requires DSP R2
-CFLAGS += -DLIBYUV_DISABLE_MIPS=1
-CXXFLAGS += -DLIBYUV_DISABLE_MIPS=1
+DEB_CFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
+DEB_CXXFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
else
ifeq ($(DEB_HOST_ARCH), mipsel)
configure_flags += --target=generic-gnu
# Disable MIPS assembly for now, it requires DSP R2
-CFLAGS += -DLIBYUV_DISABLE_MIPS=1
-CXXFLAGS += -DLIBYUV_DISABLE_MIPS=1
+DEB_CFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
+DEB_CXXFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
else
configure_flags += --target=generic-gnu
endif
@@ -82,100 +85,43 @@ CROSS=$(DEB_HOST_GNU_TYPE)-
export CROSS
endif
-CFLAGS += -Wall $(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CFLAGS)
-CXXFLAGS += -Wall $(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CXXFLAGS)
-LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
-
builddir := $(CURDIR)/builddir
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- mkdir -p $(builddir); \
- cd $(builddir); \
- CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \
- $(configure_flags)
- touch $@
-ifeq ($(BUILD_NEON), Yes)
- mkdir -p $(builddir)-neon; \
- cd $(builddir)-neon; \
- CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \
- $(configure_flags_neon)
- touch $@
-endif
+export DEB_CFLAGS_MAINT_APPEND
+export DEB_CXXFLAGS_MAINT_APPEND
+
+%:
+ dh $@
-build-arch: build
-build-indep: build
-build: build-stamp
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -rf $(builddir) $(builddir)-neon
-build-stamp: configure-stamp
- dh_testdir
- $(MAKE) -C $(builddir) verbose=yes
+override_dh_auto_configure:
+ mkdir -p $(builddir) ; \
+ cd $(builddir) ; \
+ ${CURDIR}/configure $(configure_flags)
ifeq ($(BUILD_NEON), Yes)
- $(MAKE) -C $(builddir)-neon verbose=yes
+ mkdir -p $(builddir)-neon ; \
+ cd $(builddir)-neon ; \
+ ${CURDIR}/configure $(configure_flags_neon)
endif
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f *-stamp
- rm -rf $(builddir)
- rm -rf $(builddir)-neon
- dh_clean
-install: build-stamp
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
+override_dh_auto_build:
$(MAKE) -C $(builddir) verbose=yes dist
ifeq ($(BUILD_NEON), Yes)
$(MAKE) -C $(builddir)-neon verbose=yes dist
endif
# don't use stripped library...
cp -v $(builddir)/libvpx_g.a \
- $(builddir)/vpx-vp8-*/lib/libvpx.a
+ $(builddir)/vpx-vp8-*/lib/libvpx.a
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_install -i
- dh_installchangelogs -i CHANGELOG
- dh_installdocs -i -A README AUTHORS
- dh_link -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
+override_dh_installdocs:
+ dh_installdocs
+ dh_installdocs -A README AUTHORS
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_install -s
- mkdir -p debian/libvpx4/usr/lib/$(DEB_HOST_MULTIARCH)
- cp -a builddir/vpx-vp8-*/lib/libvpx.so.* debian/libvpx4/usr/lib/$(DEB_HOST_MULTIARCH)
-ifeq ($(BUILD_NEON), Yes)
- mkdir -p debian/libvpx4/usr/lib/$(DEB_HOST_MULTIARCH)/vfp/neon
- cp -a builddir-neon/vpx-vp8-*/lib/libvpx.so.* debian/libvpx4/usr/lib/$(DEB_HOST_MULTIARCH)/vfp/neon
-endif
- mkdir -p debian/libvpx-dev/usr/lib/$(DEB_HOST_MULTIARCH)
- cp -a builddir/vpx-vp8-*/lib/libvpx.so builddir/vpx-vp8-*/lib/libvpx.a debian/libvpx-dev/usr/lib/$(DEB_HOST_MULTIARCH)
- dh_installdocs -s -A README AUTHORS
- dh_installchangelogs -s CHANGELOG
- dh_link -s
- dh_strip -s --dbgsym-migration='libvpx3-dbg (<< 1.5.0-3~)'
- dh_compress -s
- dh_fixperms -s
- dh_makeshlibs -plibvpx4 -V 'libvpx4 (>= 1.6.0)' -- -c4
- dh_installdeb -s
- dh_shlibdeps -s
- dh_gencontrol -s
- dh_md5sums -s
- dh_builddeb -s
+override_dh_strip:
+ dh_strip --dbgsym-migration='libvpx3-dbg (<< 1.5.0-3~)'
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary install clean
+override_makeshlibs:
+ dh_makeshlibs -plibvpx4 -V 'libvpx4 (>= 1.6.0)' -- -c4
--
libvpx packaging
More information about the pkg-multimedia-commits
mailing list