]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
support: some updates to build system 3.4beta4
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 27 Mar 2013 09:45:24 +0000 (09:45 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 28 Mar 2013 11:08:13 +0000 (11:08 +0000)
(cherry picked from commit 4e7506abbed9faa65d9230ca9b406469403e94d9)

Conflicts:

support/apt-update

support/apt-update [moved from support/launchpad-ppa with 56% similarity]
support/dput.cf [new file with mode: 0644]
support/pbuilder

similarity index 56%
rename from support/launchpad-ppa
rename to support/apt-update
index ff367d04255398a01cb72cbbbdc08c05c71edf14..e990e129a79db994c22f9374bb088c433cd3d0ed 100755 (executable)
@@ -13,11 +13,12 @@ function die
 }
 
 # CMD
-CMD=$(basename $0)
+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"
+TVH_ROOT=$(cd "$(dirname "$0")"/..; pwd)
+[ -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 (file)
index 0000000..600781a
--- /dev/null
@@ -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
index 5cd9a3a81bfd45583e1e83e251058764e4a82fcc..cba50a267a8e9d73ff75f2ee9cfd8525f172dbed 120000 (symlink)
@@ -1 +1 @@
-launchpad-ppa
\ No newline at end of file
+apt-update
\ No newline at end of file