[SCM] gpac/master: Update repacking mechanism

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Tue Jun 9 08:15:48 UTC 2015


The following commit has been merged in the master branch:
commit eed6bf1194d03faee1a2fe3c41bdd6a919d25809
Author: Alessio Treglia <alessio at debian.org>
Date:   Tue Jun 9 09:13:52 2015 +0100

    Update repacking mechanism
    
    The project moved to github.

diff --git a/debian/gpac-get-orig-source b/debian/gpac-get-orig-source
index fc6a8fa..b0a3d16 100755
--- a/debian/gpac-get-orig-source
+++ b/debian/gpac-get-orig-source
@@ -1,20 +1,25 @@
-#!/bin/sh
+#!/bin/bash
 
 set -e
 
 # Script used to generate the orig source tarball for gpac.
 
-GPAC_SVN_URL="svn://svn.code.sf.net/p/gpac/code/trunk/gpac"
-GPAC_BASE_VER="${GPAC_BASE_VER:-0.5.0}"
-GPAC_VERSION="${GPAC_BASE_VER}+svn${GPAC_SVN_REVISION}"
+mkdir -p "$(pwd)"/get-orig-source
+pushd get-orig-source >/dev/null
 
-svn export -r "$GPAC_SVN_REVISION" "$GPAC_SVN_URL" "gpac-${GPAC_VERSION}" 1>/dev/null 2>&1
+GIT_REPO_URL="https://github.com/gpac/gpac"
+CLONE_DIR="gpac-git"
+
+[ -d "${CLONE_DIR}" ] || git clone "${GIT_REPO_URL}" "${CLONE_DIR}" 1>/dev/null 2>&1
+pushd "${CLONE_DIR}" >/dev/null
+VERSION="$(git describe | sed -e 's/v\(.*\)/\1/')"
+popd >/dev/null
 
 # Remove temp files and other cruft from source tarball
 # The find command snippet here was taken from debhelper's dh_clean command
 # with some modification to delete more unneeded files.
 echo "Removing temp files and other cruft from source tarball" 1>/dev/null 2>&1
-find gpac-${GPAC_VERSION} \
+find "${CLONE_DIR}" \
   \( \
     \( -type f -a \
       \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
@@ -31,13 +36,18 @@ find gpac-${GPAC_VERSION} \
   \)
 
 # Make ./configure executable
-chmod 755 gpac-${GPAC_VERSION}/configure
+chmod 755 "${CLONE_DIR}"/configure
 
 # Remove empty directories
 echo "Removing empty directories" 1>/dev/null 2>&1
-find gpac-${GPAC_VERSION} -type d -empty -delete
+find "${CLONE_DIR}" -type d -empty -delete
+
+mv "${CLONE_DIR}" "gpac-${VERSION}"
+XZ_OPT=-9fqzv tar --exclude-vcs -cJf "gpac_${VERSION}.orig.tar.xz" \
+  "gpac-${VERSION}/"
+rm -rf "gpac-${VERSION}/"
+
+echo "--upstream-version ${VERSION} $(pwd)/gpac_${VERSION}.orig.tar.xz"
+
+popd >/dev/null
 
-BZIP2=-9f tar --exclude-vcs -cjf "gpac_${GPAC_VERSION}.orig.tar.bz2" \
-  "gpac-${GPAC_VERSION}/"
-rm -rf "gpac-${GPAC_VERSION}/"
-echo "--upstream-version ${GPAC_VERSION} gpac_${GPAC_VERSION}.orig.tar.bz2"
diff --git a/debian/repack.sh b/debian/repack.sh
index ae71ef5..7639187 100755
--- a/debian/repack.sh
+++ b/debian/repack.sh
@@ -142,6 +142,10 @@ case "$FILETYPE" in
         C_PROGRAM="gzip"
         C_SUFFIX="gz"
         ;;
+    application/x-xz)
+        C_PROGRAM="xz"
+        C_SUFFIX="xz"
+        ;;
     application/x-bzip2)
         C_PROGRAM="bzip2"
         C_SUFFIX="bz2"

-- 
gpac packaging



More information about the pkg-multimedia-commits mailing list