[SCM] x264 packaging branch, ubuntu, updated. debian/0.85.1442.1+git781d30-1-2-g11c4c4e

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sat Feb 20 11:22:39 UTC 2010


The following commit has been merged in the ubuntu branch:
commit 112189fb0e9fb06ce1e36c116ad1ec4aa9f1d745
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Sat Feb 20 10:46:55 2010 +0100

    fill useful informtaion into config.h

diff --git a/debian/debian-version.sh b/debian/debian-version.sh
new file mode 100644
index 0000000..560221a
--- /dev/null
+++ b/debian/debian-version.sh
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+# mimics upstream's version.h but works inside the debian package
+VENDOR=`dpkg-vendor --query vendor`
+PACKAGE_VERSION=`dpkg-parsechangelog  | awk '/^Version:/ {print $$2}'`
+BUILD=`grep '#define X264_BUILD' < x264.h | sed -e 's/.* \([1-9][0-9]*\).*/\1/'`
+POINTVER=`echo $PACKAGE_VERSION | sed -e 's/[0-9]\:\(0\.[0-9]*\.[0-9]*\).*/\1/'`
+
+echo "#define X264_VERSION \" ${VENDOR}_${PACKAGE_VERSION}\"" >> config.h
+echo "#define X264_POINTVER \"$POINTVER ${VENDOR}_${PACKAGE_VERSION}\"" >> config.h
+
diff --git a/debian/rules b/debian/rules
index 30f978c..11085e8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,6 +36,11 @@ build: build-stamp
 build-stamp: debian/stamp-patched
 	dh_testdir
 
+	# fix version.sh for the debian package
+	mv version.sh version.sh-upstream
+	cp debian/debian-version.sh version.sh
+	chmod +x version.sh
+
 	# Build static lib
 	CFLAGS="$(CFLAGS)" ./configure $(confflags)
 	$(MAKE) -j $(NCPUS) libx264.a
@@ -49,10 +54,12 @@ build-stamp: debian/stamp-patched
 	CFLAGS="$(CFLAGS)" ./configure $(confflags) --enable-shared \
 	--enable-pic --enable-visualize
 
+
 	$(MAKE) -j $(NCPUS)
 
 	# Restore static lib
 	mv libx264.a.bak libx264.a
+	mv version.sh-upstream version.sh
 
 	touch $@
 
@@ -61,6 +68,7 @@ clean-real:
 	dh_testdir
 	dh_testroot
 	[ ! -f Makefile ] || $(MAKE) distclean
+	[ ! -f version.sh-upstream ] ||  mv version.sh-upstream version.sh
 	dh_clean build-stamp libx264.a.bak
 
 install:

-- 
x264 packaging



More information about the pkg-multimedia-commits mailing list