From 4e7506abbed9faa65d9230ca9b406469403e94d9 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Wed, 27 Mar 2013 09:45:24 +0000 Subject: [PATCH] support: some updates to build system --- support/{launchpad-ppa => apt-update} | 32 ++++++++++++++++++--------- support/dput.cf | 21 ++++++++++++++++++ support/pbuilder | 2 +- 3 files changed, 44 insertions(+), 11 deletions(-) rename support/{launchpad-ppa => apt-update} (60%) create mode 100644 support/dput.cf diff --git a/support/launchpad-ppa b/support/apt-update similarity index 60% rename from support/launchpad-ppa rename to support/apt-update index bda6c26e..0d192779 100755 --- a/support/launchpad-ppa +++ b/support/apt-update @@ -14,10 +14,11 @@ function die # CMD CMD=$(basename "$0") +DIR=$(cd $(dirname "$0"); pwd) # Configuration TVH_ROOT=$(cd "$(dirname "$0")"/..; pwd) -[ -z "$TVH_DIST" ] && TVH_DIST="lucid natty oneiric precise quantal" +[ -z "$TVH_DIST" ] && TVH_DIST="wheezy lucid natty oneiric precise quantal" [ -z "$TVH_ARCH" ] && TVH_ARCH="i386 amd64" # Options @@ -27,25 +28,35 @@ TVH_ROOT=$(cd "$(dirname "$0")"/..; pwd) # Setup cd "$TVH_ROOT" || exit 1 NOW=`date -R` -CHANGELOG=$TVH_ROOT/debian/changelog -VERFILE=$TVH_ROOT/src/version.c +CHANGELOG=./debian/changelog +VERFILE=./src/version.c # Checkout git checkout $REL || die "could not checkout $REL" -git clean -dfx || die "could not clean git tree" -# Create version file -VER=$("$TVH_ROOT/support/version" $VERFILE) +# Get version +VER=$("./support/version" $VERFILE) + +# Export git tree +TMPDIR=/tmp/$CMD-$$ +trap "rm -rf $TMPDIR" EXIT +mkdir -p "$TMPDIR" +git archive --prefix=tvheadend/ HEAD | tar -C "${TMPDIR}" -x ||\ + die "failed to archive git tree" +cd "$TMPDIR/tvheadend" || die "failed to enter archived tree" # Fetch scan files ./support/getmuxlist || die "failed to fetch dvb-scan files" +cd .. # For each distro for d in $TVH_DIST; do V=${VER}~${d} + mv tvheadend "tvheadend-${V}" + cd "tvheadend-${V}" # Create changelog - $TVH_ROOT/support/changelog "$CHANGELOG" "$d" "$VER" || exit 1 + ./support/changelog "$CHANGELOG" "$d" "$VER" || exit 1 # Build source package dpkg-buildpackage -I.git* -S -sgpg -pgpg || exit 1 @@ -59,10 +70,11 @@ for d in $TVH_DIST; do # Upload else + [ ! -f "$HOME/.dput.cf" ] && DPUT_OPT="$DPUT_OPT -c $DIR/dput.cf" dput $DPUT_OPT tvh-${PPA} ../tvheadend_${V}_source.changes || exit 1 fi + # Rename back + cd .. + mv "tvheadend-${V}" tvheadend done - -# Cleanup -git checkout . diff --git a/support/dput.cf b/support/dput.cf new file mode 100644 index 00000000..600781aa --- /dev/null +++ b/support/dput.cf @@ -0,0 +1,21 @@ +# +# Tvheadend PPAs +# + +[tvh-unstable] +fqdn = apt.tvheadend.org +method = scp +incoming = /srv/reprepro/unstable/incoming +allow_unsigned_uploads = 0 + +[tvh-beta] +fqdn = apt.tvheadend.org +method = scp +incoming = /srv/reprepro/beta/incoming +allow_unsigned_uploads = 0 + +[tvh-stable] +fqdn = apt.tvheadend.org +method = scp +incoming = /srv/reprepro/stable/incoming +allow_unsigned_uploads = 0 diff --git a/support/pbuilder b/support/pbuilder index 5cd9a3a8..cba50a26 120000 --- a/support/pbuilder +++ b/support/pbuilder @@ -1 +1 @@ -launchpad-ppa \ No newline at end of file +apt-update \ No newline at end of file