From b4a4c4c1bd5c15c1dfcfe54e59f17f89c33180cc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 5 Jun 2012 07:53:04 +0200 Subject: [PATCH] Add version + mkdist for building Deb packages --- IDMETA | 4 ++++ mkdist.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 IDMETA create mode 100755 mkdist.sh diff --git a/IDMETA b/IDMETA new file mode 100644 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 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 + + -- 1.7.10.4