[SCM] FFmpeg packaging branch, master, updated. upstream/0.svn20090110-22-ge72bcc9

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Mon Jan 12 21:24:51 UTC 2009


The following commit has been merged in the master branch:
commit e72bcc91bfb4afd377a5048b4ad961db2b31d0cc
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Mon Jan 12 21:31:08 2009 +0100

    simplify the process of updating a new upstream revision
    
     - stamp the used svn revision in ffmpeg/.svnrevision and
       ffmpeg/libswscale/.svnrevision
     - always generate both tarballs
     - adapt debian/rules
     - calculate svn revision in the ./configure parameter

diff --git a/debian/README.upstream-upgrade b/debian/README.upstream-upgrade
index 0865bc8..dd8bf02 100644
--- a/debian/README.upstream-upgrade
+++ b/debian/README.upstream-upgrade
@@ -1,22 +1,16 @@
 
 Checklist and howto for ffmpeg upstream upgrades:
 
- - update debian/changelog
- - run 'debian/rules get-orig-source'
- - run 'git-import-orig --debian-branch=$branch ../ffmpeg-XXX.orig.tar.gz'
- - check and note the svn revision numbers
- - check debian/rules to call the configure script with the correct numbers
+ - run 'sh debian/get-orig-source -dYYYYMMDD'
+ - run 'git-import-orig --debian-branch=$branch --pristine-tar ../ffmpeg-XXX.orig.tar.gz'
+ - check and note the svn revision numbers from ffmpeg/.svnrevision in debian/changelog
+ - document new formats additions in debian/changelog
  - build the package, compare against the the version already in the archive
    - headers in the -dev packages with 
    - soname in the libraries
    - formats.txt in the libavcodecs package
- - document new formats additions in debian/changelog
 
 TODOs
 
  - improvements to get-orig-source.sh script:
     - commit to git
-    - use --ignore-externals when checking out
-    - generate both stripped and unstripped tarballs at the same time
-    - determine svn revision automatically, note that down in some generated file
-    - make debian/rules check for that generated file
diff --git a/debian/confflags b/debian/confflags
index e7b5974..df99071 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -12,6 +12,8 @@ export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
+SVNREVISION=$(shell cat .svnrevision 2>/dev/null || echo "UNKNOWN")
+
 # the other flavors always build dynamic versions
 ifeq      ($(DEB_HOST_ARCH),i386)
 FLAVORS += cmov
@@ -31,7 +33,7 @@ gpl_confflags += --enable-x11grab
 # Common configuration flags; comment out following line for LGPL versions of
 # the libraries
 confflags += $(gpl_confflags)
-confflags += --extra-version='svn15824+$(DEB_VERSION)'
+confflags += --extra-version='svn$(SVNREVISION)+$(DEB_VERSION)'
 confflags += --prefix=/usr
 confflags += --enable-avfilter
 confflags += --enable-avfilter-lavf
diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh
index 634aeba..31017bc 100644
--- a/debian/get-orig-source.sh
+++ b/debian/get-orig-source.sh
@@ -39,61 +39,62 @@ error () {
 }
 
 set +e
-PARAMS=`getopt hr:c:o: "$@"`
+PARAMS=`getopt hd: "$@"`
 if test $? -ne 0; then usage; exit 1; fi;
 set -e
 
 eval set -- "$PARAMS"
 
 DEBUG=false
-REVISION=
-CLEANUPSCRIPT=
-TARBALL=
+SVNDATE=
 
 while test $# -gt 0
 do
 	case $1 in
 		-h) usage; exit 1 ;;
-		-r) REVISION=$2; shift ;;
-		-c) CLEANUPSCRIPT=$2; shift ;;
-		-o) TARBALL=$2; shift ;;
+		-d) SVNDATE=$2; shift ;;
 		--) shift ; break ;;
 		*)  echo "Internal error!" ; exit 1 ;;
 	esac
 	shift
 done
 
-if [ -z $REVISION ]; then
-	error "you need to specify an svn revision"
-fi
+# sanity checks now
+dh_testdir
 
-if [ -z $TARBALL ]; then
-	error "you need to specify a tarballname"
+if [ -z $SVNDATE ]; then
+	error "you need to specify an svn date. e.g. 20081230 for Dec 29. 2009"
 fi
 
-if [ -n $CLEANUPSCRIPT ] && [ -f $CLEANUPSCRIPT ]; then
-	if [ ! -x $CLEANUPSCRIPT ]; then
-		error "$CLEANUPSCRIPT must be executable"
-	fi
-fi
+CLEANUPSCRIPT=`pwd`/debian/strip.sh
+TARBALL=../ffmpeg-debian_0.svn${SVNDATE}.orig.tar.gz
+TARBALL_UNSTRIPPED=../ffmpeg_0.svn${SVNDATE}.orig.tar.gz
 
 TMPDIR=`mktemp -d`
 trap 'rm -rf ${TMPDIR}'  EXIT
 
-svn export -r${REVISION} \
+svn export -r{${SVNDATE}} \
+	--ignore-externals \
 	svn://svn.mplayerhq.hu/ffmpeg/trunk \
 	${TMPDIR}/ffmpeg
 
-# libswscale is just an unversioned redirect, so we have to export it properly by hand
-rm -rf ${TMPDIR}/ffmpeg/libswscale
+svn info -r{${SVNDATE}} \
+	svn://svn.mplayerhq.hu/ffmpeg/trunk \
+	| awk '/^Revision/ {print $2}' \
+	> ${TMPDIR}/ffmpeg/.svnrevision
 
-svn export -r${REVISION} \
+svn export -r{${SVNDATE}} \
 	svn://svn.mplayerhq.hu/mplayer/trunk/libswscale \
 	${TMPDIR}/ffmpeg/libswscale
+
+svn info -r{${SVNDATE}} \
+	svn://svn.mplayerhq.hu/mplayer/trunk/libswscale \
+	| awk '/^Revision/ {print $2}' \
+	> ${TMPDIR}/ffmpeg/libswscale/.svnrevision
+
+tar czf ${TARBALL_UNSTRIPPED} -C ${TMPDIR} ffmpeg
 	
-if [ -n ${CLEANUPSCRIPT} ]; then
-	( cd ${TMPDIR}/ffmpeg && ${CLEANUPSCRIPT} )
-fi
+( cd ${TMPDIR}/ffmpeg && sh ${CLEANUPSCRIPT} )
 
 tar czf ${TARBALL} -C ${TMPDIR} ffmpeg
 
diff --git a/debian/rules b/debian/rules
index ae10c25..2676730 100755
--- a/debian/rules
+++ b/debian/rules
@@ -76,9 +76,7 @@ get-orig-source:
 	dh_testdir
 	# strip patented code
 	chmod +x debian/strip.sh
-	sh debian/get-orig-source.sh -r{$(SVN_VERSION)} \
-	    $(if $(internalencoders),, -c $(CURDIR)/debian/strip.sh) \
-	    -o ../$(DEB_SOURCE)_$(UPSTREAM_VERSION).orig.tar.gz
+	sh debian/get-orig-source.sh -d$(SVN_VERSION)
 
 # The trailing newline is important!
 define install_flavor

-- 
FFmpeg packaging



More information about the pkg-multimedia-commits mailing list