[SCM] x265/master: Build and install the 10 bit variant

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Mon Dec 8 21:37:26 UTC 2014


The following commit has been merged in the master branch:
commit 20773b8d3ee742d20f9dfaa37ca016c59681fb20
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Mon Dec 8 21:56:23 2014 +0100

    Build and install the 10 bit variant
    
    Also add a helper script that launches a program with LD_LIBRARY_PATH set to
    load 10 bit variant

diff --git a/debian/libx265-35.install b/debian/libx265-35.install
index f57035e..6ca4147 100644
--- a/debian/libx265-35.install
+++ b/debian/libx265-35.install
@@ -1 +1,2 @@
 usr/lib/*/libx265.so.35
+usr/lib/*/x265-10bit/libx265.so.35
diff --git a/debian/libx265-dev.install b/debian/libx265-dev.install
index 3d2cf21..db93cb4 100644
--- a/debian/libx265-dev.install
+++ b/debian/libx265-dev.install
@@ -1,4 +1,6 @@
 usr/include/*
 usr/lib/*/libx265.a
 usr/lib/*/libx265.so
+usr/lib/*/x265-10bit/libx265.a
+usr/lib/*/x265-10bit/libx265.so
 usr/lib/*/pkgconfig
diff --git a/debian/rules b/debian/rules
index c274641..4fc0cbb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,16 +4,36 @@ export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
 # LFS support
 export DEB_CPPFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS)
 
+DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 %:
-	dh $@ --parallel --sourcedirectory=source --buildsystem=cmake
+	dh $@ --parallel --buildsystem=cmake \
+		--sourcedirectory=source \
+		--builddirectory=x265-8bit
 
-override_dh_clean:
-	dh_clean
+override_dh_auto_clean:
+	dh_auto_clean --builddirectory=x265-10bit
+	dh_auto_clean
 	rm -rf doc/reST/build
 
 override_dh_auto_configure:
+	dh_auto_configure --builddirectory=x265-10bit -- \
+		-DHIGH_BIT_DEPTH=ON \
+		-DENABLE_CLI=OFF \
+		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH)/x265-10bit
 	dh_auto_configure -- \
-		-DLIB_INSTALL_DIR=lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH)
+
+override_dh_auto_build-arch:
+	dh_auto_build --builddirectory=x265-10bit
+	dh_auto_build
+
+override_dh_auto_install-arch:
+	dh_auto_install --builddirectory=x265-10bit
+	dh_auto_install
+	sed -e 's, at DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH),' \
+		debian/x265-10bit.in > debian/tmp/usr/bin/x265-10bit
+	chmod a+x debian/tmp/usr/bin/x265-10bit
 
 override_dh_auto_build-indep:
 	$(MAKE) -C doc/reST html
diff --git a/debian/x265-10bit.1 b/debian/x265-10bit.1
new file mode 100644
index 0000000..b987ca7
--- /dev/null
+++ b/debian/x265-10bit.1
@@ -0,0 +1,17 @@
+.TH "x265-10bit" "1" "December 2014" "x265-10bit" "User Commands"
+.SH NAME
+x256-10bit \- wrapper script to launch a program using 10 bit x265 library
+.SH SYNOPSIS
+x265-10bit <program> [arguments]
+.SH DESCRIPTION
+x256-10bit is a wrapper script that sets LD_LIBRARY_PATH so that the 10 bit
+variant of the x265 library is used.
+.SH EXAMPLES
+Start handbrake with the 10 bit x265 library:
+.PP
+.Vb 1
+        x265-10bit handbrake
+.SH SEE ALSO
+x265(1)
+.SH AUTHOR
+Sebastian Ramacher <sramacher at debian.org>
diff --git a/debian/x265-10bit.in b/debian/x265-10bit.in
new file mode 100644
index 0000000..f4c6fff
--- /dev/null
+++ b/debian/x265-10bit.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Helper script to launch a program using the 10 bit x265 library.
+
+if [ $# -eq 0 ] ; then
+  echo "Usage: `basename $0` <program> [arguments]"
+  exit 2
+fi
+
+export LD_LIBRARY_PATH=/usr/lib/@DEB_HOST_MULTIARCH@/x265-10bit${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-}
+exec "$@"
+echo "Failed to execute '$@'." >&2
+exit 1
diff --git a/debian/x265.install b/debian/x265.install
index f178585..e43897b 100644
--- a/debian/x265.install
+++ b/debian/x265.install
@@ -1 +1,2 @@
 usr/bin/x265
+usr/bin/x265-10bit
diff --git a/debian/x265.manpages b/debian/x265.manpages
index 300fc8f..b3e4942 100644
--- a/debian/x265.manpages
+++ b/debian/x265.manpages
@@ -1 +1,2 @@
 debian/x265.1
+debian/x265-10bit.1

-- 
x265 packaging



More information about the pkg-multimedia-commits mailing list