Add version + mkdist for building Deb packages
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 Jun 2012 05:53:04 +0000 (07:53 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 Jun 2012 05:53:04 +0000 (07:53 +0200)
IDMETA [new file with mode: 0644]
mkdist.sh [new file with mode: 0755]

diff --git a/IDMETA b/IDMETA
new file mode 100644 (file)
index 0000000..c97affc
--- /dev/null
+++ b/IDMETA
@@ -0,0 +1,4 @@
+DEBIAN_DIST="squeeze"
+UBUNTU_DIST="precise oneiric natty lucid"
+VERSION=1.1.1
+NAME=php5-yaz
diff --git a/mkdist.sh b/mkdist.sh
new file mode 100755 (executable)
index 0000000..bec7cbc
--- /dev/null
+++ b/mkdist.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -x
+DEBCHANGELOG=debian/changelog
+
+l=`head -1 $DEBCHANGELOG`
+NAME=`echo $l|sed 's/ .*//g'`
+FULLVERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'`
+DEBVERSION=`echo $FULLVERSION|sed 's/-.*//g'`
+. ./IDMETA
+if test "$DEBVERSION" != "$VERSION"; then
+    echo "WARNING: File VERSION and debian/changelog do not match"
+    sleep 2
+fi
+git log >ChangeLog
+git archive --format=tar --prefix=$NAME-$VERSION/ HEAD > $NAME-$VERSION.tar
+tar xf $NAME-$VERSION.tar
+cp ChangeLog $NAME-$VERSION
+cd  $NAME-$VERSION
+rm -fr debian
+cd ..
+tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION
+rm $NAME-$VERSION.tar
+rm -r $NAME-$VERSION
+exit 0
+
+