Permalink
Browse files

Cleanup the debian/ directory and make it use more dh scripts and add…

… entry points for Autobuild system
  • Loading branch information...
1 parent 0037857 commit da053d7c29054d1de2d0290fef04baf4cb5df644 @andoma committed Apr 10, 2012
View
@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+# Entry point for the Doozer autobuild system
+#
+# (c) Andreas Öman 2011. All rights reserved.
+#
+#
+
+set -eu
+
+BUILD_API_VERSION=2
+EXTRA_BUILD_NAME=""
+JARGS=""
+JOBSARGS=""
+TARGET=""
+RELEASE="--release"
+WORKINGDIR="/var/tmp/showtime-autobuild"
+UPLOAD_BUILD_ARTIFACTS=1
+while getopts "vht:e:j:w:R" OPTION
+do
+ case $OPTION in
+ v)
+ echo $BUILD_API_VERSION
+ exit 0
+ ;;
+ R)
+ UPLOAD_BUILD_ARTIFACTS=0
+ ;;
+ h)
+ echo "This script is intended to be used by the autobuild system only"
+ exit 0
+ ;;
+ t)
+ TARGET="$OPTARG"
+ ;;
+ e)
+ EXTRA_BUILD_NAME="$OPTARG"
+ ;;
+ j)
+ JOBSARGS="--jobs=$OPTARG"
+ JARGS="-j$OPTARG"
+ ;;
+ w)
+ WORKINGDIR="$OPTARG"
+ ;;
+ esac
+done
+
+
+if [[ -z $TARGET ]]; then
+ echo "target (-t) not specified"
+ exit 1
+fi
+
+#
+# $1 = local file path
+# $2 = type
+# $3 = content-type
+# $4 = filename
+#
+artifact() {
+ if [ $UPLOAD_BUILD_ARTIFACTS -eq 1 ]; then
+ echo "doozer-artifact:$PWD/$1:$2:$3:$4"
+ else
+ echo "Ignoring: $1:$2:$3:$4"
+ fi
+}
+
+if [ -f Autobuild/${TARGET}.sh ]; then
+ source Autobuild/${TARGET}.sh
+else
+ echo "target $TARGET not supported"
+ exit 1
+fi
View
@@ -0,0 +1,26 @@
+CHANGELOG=debian/changelog
+NOW=`date -R`
+VER=`git describe | sed "s/\([0-9]*\)\.\([0-9]*\)-\([0-9]*\)-.*/\1.\2.\3/"`
+echo >${CHANGELOG} "tvheadend (${VER}) unstable; urgency=low"
+echo >>${CHANGELOG}
+echo >>${CHANGELOG} " * The full changelog can be found at "
+echo >>${CHANGELOG} " http://www.lonelycoder.com/tvheadend/download"
+echo >>${CHANGELOG}
+echo >>${CHANGELOG} " -- Andreas Öman <andreas@lonelycoder.com> ${NOW}"
+cat ${CHANGELOG}
+export JOBSARGS
+export JARGS
+dpkg-buildpackage -b -us -uc
+
+for a in ../tvheadend*${VER}*.deb; do
+ artifact $a deb application/x-deb `basename $a`
+ rm -f $a
+done
+
+for a in ../tvheadend*${VER}*.changes; do
+ artifact $a changes text/plain `basename $a`
+ rm -f $a
+done
+
+rm -f ${CHANGELOG}
+dh_clean
@@ -0,0 +1 @@
+source Autobuild/debian.sh
@@ -0,0 +1 @@
+source Autobuild/debian.sh
Oops, something went wrong.

0 comments on commit da053d7

Please sign in to comment.