[pkg-nvidia-devel] r1494 - /packages/libvdpau/trunk/debian/libvdpau-get-orig-source

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Sun Sep 12 05:37:55 UTC 2010


Author: ceros-guest
Date: Sun Sep 12 05:37:39 2010
New Revision: 1494

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=1494
Log:
Use script to generate latest source.

Added:
    packages/libvdpau/trunk/debian/libvdpau-get-orig-source   (with props)

Added: packages/libvdpau/trunk/debian/libvdpau-get-orig-source
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/debian/libvdpau-get-orig-source?rev=1494&op=file
==============================================================================
--- packages/libvdpau/trunk/debian/libvdpau-get-orig-source (added)
+++ packages/libvdpau/trunk/debian/libvdpau-get-orig-source Sun Sep 12 05:37:39 2010
@@ -1,0 +1,74 @@
+#!/bin/sh
+
+# This script is used to download the upstream source for libvdpau and
+# generate it into an orig source tarball for Debian.
+
+# Common variables used to ease maintenance of this script
+LIBVDPAU_VERSION="0.4.1"
+LIBVDPAU_TARBALL="libvdpau-$LIBVDPAU_VERSION.tar.gz"
+LIBVDPAU_TARBALL_CHECKSUM="3189319763e420fd52523df4e80d86629c5134cd4e4fa920b3d6dfde17b808f5"
+LIBVDPAU_ORIG_TARBALL="libvdpau_$LIBVDPAU_VERSION.orig.tar.gz"
+USAGE="\n\
+This script is used to generate the orig tarball used in building\n\
+Debian packages for libvdpau-$LIBVDPAU_VERSION.\n\
+Usage: libvdpau-get-orig-source [OPTION]\n\
+\n\
+ -h, --help                 Display this help message.\n"
+
+while [ "$#" -gt "0" ]
+do
+    case "$1" in
+        -h|--help|*)
+            echo "${USAGE}"
+            exit 1
+            ;;
+    esac
+done
+
+make_current_tarball() {
+    # Download the tarball if it's not available in the current directory
+    [ -f $LIBVDPAU_TARBALL ] || \
+        wget -c http://cgit.freedesktop.org/~aplattner/libvdpau/snapshot/$LIBVDPAU_TARBALL
+
+    # Verify the checksum
+    COMPUTED_CHECKSUM=`sha256sum $LIBVDPAU_TARBALL | cut -d ' ' -f 1`
+    if [ $LIBVDPAU_TARBALL_CHECKSUM != $COMPUTED_CHECKSUM ] ; then
+        echo "Checksum verification failed. Checksum was $COMPUTED_CHECKSUM
+    Expected checksum $LIBVDPAU_TARBALL_CHECKSUM."
+        exit 1
+    else
+        echo "Checksum verified. Checksum is $COMPUTED_CHECKSUM."
+    fi
+
+    # Extract tarball and run 'autoreconf -vif'
+    echo "Extracting tarball and running 'autoreconf -vif'"
+    tar -zxf $LIBVDPAU_TARBALL
+    cd libvdpau-$LIBVDPAU_VERSION
+    autoreconf -vif
+    cd ..
+
+    # 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"
+    find libvdpau-$LIBVDPAU_VERSION \( \( -type f -a \
+        \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
+        -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
+        -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
+        -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
+        -o -name config.status -o -name config.cache -o -name config.log \
+        \) -exec rm -f "{}" \; \) -o \
+        \( -type d -a -name autom4te.cache -prune -exec rm -rf "{}" \; \) \)
+    rm -rf libvdpau-$LIBVDPAU_VERSION/debian
+    rm -f libvdpau-$LIBVDPAU_VERSION/.gitignore
+
+    # Remove empty directories
+    echo "Removing empty directories"
+    find libvdpau-$LIBVDPAU_VERSION -type d -empty -delete
+
+    # Repack tarball to final orig tarball
+    echo "Creating orig tarball"
+    tar --exclude-vcs -zcf "$LIBVDPAU_ORIG_TARBALL" "libvdpau-$LIBVDPAU_VERSION/"
+}
+
+make_current_tarball

Propchange: packages/libvdpau/trunk/debian/libvdpau-get-orig-source
------------------------------------------------------------------------------
    svn:executable = *




More information about the pkg-nvidia-devel mailing list