r6824 - packages/trunk/vegastrike/debian

Andres Mejia ceros-guest at alioth.debian.org
Thu May 1 05:58:02 UTC 2008


Author: ceros-guest
Date: 2008-05-01 05:58:02 +0000 (Thu, 01 May 2008)
New Revision: 6824

Added:
   packages/trunk/vegastrike/debian/vegastrike-get-orig-source
Modified:
   packages/trunk/vegastrike/debian/changelog
Log:
Added get-orig-source script for new version of vegastrike.

Modified: packages/trunk/vegastrike/debian/changelog
===================================================================
--- packages/trunk/vegastrike/debian/changelog	2008-04-30 13:12:59 UTC (rev 6823)
+++ packages/trunk/vegastrike/debian/changelog	2008-05-01 05:58:02 UTC (rev 6824)
@@ -1,8 +1,9 @@
-vegastrike (0.5~svn12126-3) UNRELEASED; urgency=low
+vegastrike (0.5.0-1) UNRELEASED; urgency=low
 
-  * NOT RELEASED YET
+  [ Andres Mejia ]
+  * Added get-orig-source script.
 
- -- Vincent Fourmond <fourmond at debian.org>  Tue, 15 Apr 2008 01:49:57 +0200
+ -- Andres Mejia <mcitadel at gmail.com>  Thu, 01 May 2008 01:56:49 -0400
 
 vegastrike (0.5~svn12126-2) unstable; urgency=low
 

Added: packages/trunk/vegastrike/debian/vegastrike-get-orig-source
===================================================================
--- packages/trunk/vegastrike/debian/vegastrike-get-orig-source	                        (rev 0)
+++ packages/trunk/vegastrike/debian/vegastrike-get-orig-source	2008-05-01 05:58:02 UTC (rev 6824)
@@ -0,0 +1,100 @@
+#! /bin/sh
+
+# This script is used to generate the vegastrike orig tarball used for this
+# package.
+
+# Some variables to make maintaining this script easier
+VEGASTRIKE_VERSION="0.5.0"
+VEGASTRIKE_URL_DIR="http://downloads.sourceforge.net/vegastrike"
+VEGASTRIKE_TARBALL="vegastrike-source-0.5.0.tar.bz2"
+# Not what it says upstream => "8cfd7d1691173652e14fc89e4da97d1a"
+VEGASTRIKE_TARBALL_CHECKSUM="435fae23822d7e4f7563d753eb683ca0"
+
+USAGE="\n\
+This script is used to generate the orig tarball used in building\n\
+Debian packages for vegastrike-$VEGASTRIKE_VERSION.\n\
+Usage: vegastrike-get-orig-source [OPTION]\n\
+\n\
+ -h, --help                 Display this help message.\n\
+ --remove-upstream-files    Remove downloaded files.\n\
+ --keep-orig-dir            Keep the generated orig directory.\n"
+
+while [ "$#" -gt "0" ]
+do
+    case "$1" in
+        --remove-upstream-files)
+            REMOVE_UPSTREAM_FILES=1
+            shift
+            ;;
+        --keep-orig-dir)
+            KEEP_ORIG_DIR=1
+            shift
+            ;;
+        -h|--help|*)
+            echo >&2 "${USAGE}"
+            exit 1
+            ;;
+    esac
+done
+
+set -e
+
+# Function to download files. Takes two parameters, the directory name of the
+# url to use, and the filename of the file.
+download() {
+    local url="$1/$2"
+    if [ ! -f $2 ] ; then
+        # Download the tarball
+        wget $url
+    fi
+}
+
+# Function to verify the checksum. Takes two parameters, the file to compute the
+# checksum for and the checksum it should be.
+verify_checksum() {
+    local checksum=`md5sum $1 | cut -d ' ' -f 1`
+
+    if [ $2 != $checksum ] ; then
+        echo "Checksum verification failed. Checksum was $checksum
+    Expected checksum $2"
+        exit 1
+    else
+        echo "Checksum verified. Checksum is $2"
+    fi
+}
+
+# The rest is our main functions.
+#Download the files
+download $VEGASTRIKE_URL_DIR $VEGASTRIKE_TARBALL
+
+# Verify the checksums
+verify_checksum $VEGASTRIKE_TARBALL $VEGASTRIKE_TARBALL_CHECKSUM
+
+# Unpack the upstream source
+if [ ! -d vegastrike-$VEGASTRIKE_VERSION ]; then
+    echo "Unpacking upstream source."
+    tar -xjf $VEGASTRIKE_TARBALL
+else
+    echo "Please remove or move vegastrike-$VEGASTRIKE_VERSION directory."
+    exit 1
+fi
+
+# Repack into a gzip tarball
+if [ ! -f vegastrike-$VEGASTRIKE_VERSION ]; then
+    echo "Creating vegastrike_$VEGASTRIKE_VERSION orig tarball."
+    tar -czf vegastrike_$VEGASTRIKE_VERSION.orig.tar.gz \
+        vegastrike-$VEGASTRIKE_VERSION
+else
+    echo "Please remove or move vegastrike_$VEGASTRIKE_VERSION.orig.tar.gz."
+    exit 1
+fi
+
+# Perform cleanup
+if [ -z "$KEEP_ORIG_DIR" ]; then
+    echo "Removing extracted directory."
+    rm -rf vegastrike-$VEGASTRIKE_VERSION
+fi
+if [ -n "$REMOVE_UPSTREAM_FILES" ]; then
+    echo "Removing upstream files."
+    rm $VEGASTRIKE_TARBALL
+fi


Property changes on: packages/trunk/vegastrike/debian/vegastrike-get-orig-source
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-games-commits mailing list