[med-svn] r12018 - in trunk/package_template: . source

Andreas Tille tille at alioth.debian.org
Fri Aug 10 06:33:44 UTC 2012


Author: tille
Date: 2012-08-10 06:33:44 +0000 (Fri, 10 Aug 2012)
New Revision: 12018

Added:
   trunk/package_template/get-orig-source
   trunk/package_template/source/
   trunk/package_template/source/format
   trunk/package_template/watch
Modified:
   trunk/package_template/rules
Log:
Provide some more template files


Added: trunk/package_template/get-orig-source
===================================================================
--- trunk/package_template/get-orig-source	                        (rev 0)
+++ trunk/package_template/get-orig-source	2012-08-10 06:33:44 UTC (rev 12018)
@@ -0,0 +1,45 @@
+#!/bin/sh
+# if you need to repack for whatever reason you can
+# use this script via uscan or directly
+#
+# FIXME: currently the code is not conform to Debian Policy
+#        http://www.debian.org/doc/debian-policy/ch-source.html
+#        "get-orig-source (optional)"
+#        This target may be invoked in any directory, ...
+# --> currently it is assumed the script is called in the
+#     source directory featuring the debian/ dir
+
+COMPRESS=xz
+
+set -e
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+
+if ! echo $@ | grep -q upstream-version ; then
+    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+    uscan --force-download
+else
+    VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${NAME}.*?\1?"`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+        echo "Unable to parse version number"
+        exit
+    fi
+fi
+
+TARDIR=${NAME}-${VERSION}
+mkdir -p ../tarballs
+cd ../tarballs
+# need to clean up the tarballs dir first because upstream tarball might
+# contain a directory with unpredictable name
+rm -rf *
+tar -xaf ../${TARDIR}.tar.gz
+
+UPSTREAMTARDIR=`find . -mindepth 1 -maxdepth 1 -type d`
+if [ "${UPSTREAMTARDIR}" != "${TARDIR}" ] ; then
+    mv "${UPSTREAMTARDIR}" "${TARDIR}"
+fi
+
+# Remove useless binaries
+# ... do something which needs to be done ...
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}


Property changes on: trunk/package_template/get-orig-source
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/package_template/rules
===================================================================
--- trunk/package_template/rules	2012-08-09 16:37:12 UTC (rev 12017)
+++ trunk/package_template/rules	2012-08-10 06:33:44 UTC (rev 12018)
@@ -4,3 +4,6 @@
 
 %:
 	dh $@
+
+#get-orig-source:
+#	. debian/get-orig-source

Added: trunk/package_template/source/format
===================================================================
--- trunk/package_template/source/format	                        (rev 0)
+++ trunk/package_template/source/format	2012-08-10 06:33:44 UTC (rev 12018)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: trunk/package_template/watch
===================================================================
--- trunk/package_template/watch	                        (rev 0)
+++ trunk/package_template/watch	2012-08-10 06:33:44 UTC (rev 12018)
@@ -0,0 +1,22 @@
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php #PACKAGE#-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/#PACKAGE#-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/#PACKAGE#-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge
+# http://sf.net/#PACKAGE#/#PACKAGE#-(\d[\d\.]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
+
+# Uncomment to find new files on GooglePages
+# http://code.google.com/p/#PACKAGE#/downloads/list?can=1 \
+#  .*/#PACKAGE#-([-.\d]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip)
+
+# if tweaking of source is needed
+# \
+# debian debian/get-orig-source




More information about the debian-med-commit mailing list