[Pkg-cli-apps-commits] [SCM] banshee-community-extensions branch, master, updated. debian/2.0.1-1-5-ga9986d7

Chow Loong Jin hyperair at ubuntu.com
Wed Jul 6 02:44:12 UTC 2011


The following commit has been merged in the master branch:
commit bf2d84ed56a04d49392fd16f671201096ebe6303
Author: Chow Loong Jin <hyperair at ubuntu.com>
Date:   Wed Jul 6 04:08:20 2011 +0800

    Add autogen

diff --git a/debian/autogen.sh b/debian/autogen.sh
new file mode 100755
index 0000000..8fbe242
--- /dev/null
+++ b/debian/autogen.sh
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+
+PROJECT=banshee-community-extensions
+
+function error () {
+	echo "Error: $1" 1>&2
+	exit 1
+}
+
+function check_autotool_version () {
+	which $1 &>/dev/null || {
+		error "$1 is not installed, and is required to configure $PACKAGE"
+	}
+
+	version=$($1 --version | head -n 1 | cut -f4 -d' ')
+	major=$(echo $version | cut -f1 -d.)
+	minor=$(echo $version | cut -f2 -d.)
+	rev=$(echo $version | cut -f3 -d. | sed 's/[^0-9].*$//')
+	major_check=$(echo $2 | cut -f1 -d.)
+	minor_check=$(echo $2 | cut -f2 -d.)
+	rev_check=$(echo $2 | cut -f3 -d.)
+
+	if [ $major -lt $major_check ]; then
+		do_bail=yes
+	elif [[ $minor -lt $minor_check && $major = $major_check ]]; then
+		do_bail=yes
+	elif [[ $rev -lt $rev_check && $minor = $minor_check && $major = $major_check ]]; then
+		do_bail=yes
+	fi
+
+	if [ x"$do_bail" = x"yes" ]; then
+		error "$1 version $2 or better is required to configure $PROJECT"
+	fi
+}
+
+function run () {
+	echo "Running $@ ..."
+	$@ 2>.autogen.log || {
+		cat .autogen.log 1>&2
+		rm .autogen.log
+		error "Could not run $1, which is required to configure $PROJECT"
+	}
+	rm .autogen.log
+}
+
+srcdir=$(dirname $0)
+test -z "$srcdir" && srcdir=.
+
+(test -f $srcdir/configure.ac) || {
+	error "Directory \"$srcdir\" does not look like the top-level $PROJECT directory"
+}
+
+# MacPorts on OS X only seems to have glibtoolize
+WHICHLIBTOOLIZE=$(which libtoolize || which glibtoolize)
+if [ x"$WHICHLIBTOOLIZE" == x"" ]; then
+	error "libtool is required to configure $PROJECT"
+fi
+LIBTOOLIZE=$(basename $WHICHLIBTOOLIZE)
+
+check_autotool_version aclocal 1.9
+check_autotool_version automake 1.9
+check_autotool_version autoconf 2.53
+check_autotool_version $LIBTOOLIZE 1.4.3
+check_autotool_version intltoolize 0.35.0
+check_autotool_version pkg-config 0.14.0
+
+run intltoolize --force --copy
+run $LIBTOOLIZE --force --copy --automake
+run aclocal -I build/m4/shamrock -I build/m4/shave -I build/m4/extensions $ACLOCAL_FLAGS
+run autoconf
+run autoheader
+test -f config.h.in && touch config.h.in
+run automake --gnu --add-missing --force --copy \
+	-Wno-portability -Wno-portability
+
+if [ $# = 0 ]; then
+	echo "WARNING: I am going to run configure without any arguments."
+fi
+
+if [ -z "$NOCONFIGURE" ]; then
+    run ./configure --enable-maintainer-mode $@
+else
+    echo "Done. ./configure skipped because NOCONFIGURE was set"
+fi
+
diff --git a/debian/control b/debian/control
index 4724491..048fd56 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,8 @@ Priority: optional
 Maintainer: Debian CLI Applications Team <pkg-cli-apps-team at lists.alioth.debian.org>
 Uploaders: Chow Loong Jin <hyperair at ubuntu.com>
 Build-Depends: debhelper (>= 7.0.50),
+               dh-autoreconf,
+               libgconf2-dev,
                cli-common-dev (>= 0.5.7),
                mono-devel (>= 2.4.2.3),
                autotools-dev,
diff --git a/debian/rules b/debian/rules
index 9c5a9be..22601fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,5 +49,14 @@ override_dh_gencontrol:
 override_dh_makeclilibs:		# do nothing -- we do not want clilibs to come
                                 # from anything, and especially not clutterflow.
 
+override_dh_autoreconf: autogen.sh
+	NOCONFIGURE=1 dh_autoreconf ./autogen.sh --
+
+autogen.sh: debian/autogen.sh
+	ln -s $< $@
+
+clean:
+	rm -f autogen.sh
+
 %:
-	dh $@
+	dh $@ --with=autoreconf

-- 
banshee-community-extensions



More information about the Pkg-cli-apps-commits mailing list