r35505 - /scripts/examples/svn-buildpackage-pdebuild

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat May 16 13:23:00 UTC 2009


Author: gregoa
Date: Sat May 16 13:22:54 2009
New Revision: 35505

URL: http://svn.debian.org/wsvn/?sc=1&rev=35505
Log:
add example wrapper script

Added:
    scripts/examples/svn-buildpackage-pdebuild   (with props)

Added: scripts/examples/svn-buildpackage-pdebuild
URL: http://svn.debian.org/wsvn/scripts/examples/svn-buildpackage-pdebuild?rev=35505&op=file
==============================================================================
--- scripts/examples/svn-buildpackage-pdebuild (added)
+++ scripts/examples/svn-buildpackage-pdebuild Sat May 16 13:22:54 2009
@@ -1,0 +1,106 @@
+#!/bin/bash
+
+# Copyright gregor herrmann <gregoa at debian.org>
+# Licensed under the same terms as Perl (Artistic | GPL-1+)
+
+# wrapper script for building and checking packages
+# with svn-buildpackage and pdebuild
+
+BUILDDIR="`pwd`/../build-area"
+BUILDOPTS=
+PDEBUILDOPTS=
+
+# distributions (cowbuilder chroots)
+# e = etch, l = lenny, q = squeeze
+# options: 
+# b = binary, j = -jX, s = -sa, i = pdebuild-internal, v = -vX, t = notest
+while getopts elqij:sbv:t O; do
+	case "$O" in
+		# pbuilder example
+		#P)
+		#	DIST="--pbuilder pbuilder -- --basetgz /var/cache/pbuilder/base.tgz"
+		#	;;
+		e)
+			DIST="-- --debian-etch-workaround --basepath /var/cache/pbuilder/etch-base.cow"
+			;;
+		l)
+			DIST="-- --basepath /var/cache/pbuilder/lenny-base.cow"
+			;;
+		q)
+			DIST="-- --basepath /var/cache/pbuilder/squeeze-base.cow"
+			;;
+		b)
+			BUILDOPTS="$BUILDOPTS -B -m${DEBEMAIL}"
+			;;
+		j)
+			BUILDOPTS="$BUILDOPTS -j${OPTARG}"
+			;;
+		s)
+			BUILDOPTS="$BUILDOPTS -sa"
+			;;
+		i)
+			PDEBUILDOPTS="--use-pdebuild-internal"
+			;;
+		v)
+			BUILDOPTS="$BUILDOPTS -v${OPTARG}"
+			;;
+		t)
+			export DEB_BUILD_OPTIONS=nocheck
+			;;
+		*)
+			;;
+	esac 
+done
+shift $((OPTIND - 1))
+
+[ -n "$BUILDOPTS" ] && BUILDOPTS="--debbuildopts \"$BUILDOPTS\""
+
+svn-buildpackage --svn-builder="pdebuild --auto-debsign --buildresult $BUILDDIR/ $PDEBUILDOPTS $BUILDOPTS $DIST" "$@" || exit 1
+
+rm -rf $BUILDDIR/*obsolete*
+rm -f  $BUILDDIR/*_source.changes
+rm -f  $BUILDDIR/*.dsc.asc
+
+CHANGES=$(ls $BUILDDIR/*changes -rt| tail -n 1)
+DIFFGZ=$(ls $BUILDDIR/*.diff.gz -rt| tail -n 1)
+PKGVER=$(echo $DIFFGZ | perl -pe 's;^.+/(.+)_(.+)-.+$;\1-\2;')
+
+echo "lintian:"
+echo "========"
+lintian -i -I --show-overrides --pedantic --color auto $CHANGES
+echo "linda:"
+echo "======"
+linda -i -s -t E,W,I $CHANGES
+
+read -n 1 -p "debc? y/N " DEBC
+if [ "$DEBC" = "y" ]; then 
+	debc | less
+fi
+echo
+
+read -n 1 -p "piuparts? y/N " PIU
+if [ "$PIU" = "y" ]; then 
+	DEB=$(ls $BUILDDIR/*.deb -rt| tail -n 1)
+	sudo /usr/sbin/piuparts -p --warn-on-others $DEB
+fi
+echo
+
+if zgrep -E "^\+\+\+ " "$DIFFGZ" | grep -v $PKGVER/debian > /dev/null; then
+	echo "changes in .diff.gz outside debian/!"
+	read -n 1 -p "view .diff.gz? y/N " VIEWDIFFGZ
+	if [ "$VIEWDIFFGZ" = "y" ]; then
+		filterdiff -z -x "$PKGVER/debian/*" $DIFFGZ | colordiff | /usr/bin/less -R
+	fi
+	echo
+	echo "maybe: mkdir debian/patches && diff2patches $DIFFGZ"
+	echo
+else
+	read -n 1 -p "ready for upload? y/N " UPLOAD
+	if [ "$UPLOAD" = "y" ]; then
+		echo
+		cat $CHANGES
+		echo
+		echo dput $CHANGES
+	fi
+	echo
+fi

Propchange: scripts/examples/svn-buildpackage-pdebuild
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pkg-perl-cvs-commits mailing list