]> granicus.if.org Git - pdns/commitdiff
with this commit ./dist-recursor ; ./buid-recursor gets you debs and RPMs. Old 'speci...
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 9 Jan 2015 19:55:28 +0000 (20:55 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 9 Jan 2015 19:55:28 +0000 (20:55 +0100)
pdns/build-recursor

index 887663e3171d13b2d4ce2c9c5c4446d8c43627c2..e7d58719c8dca57f0a8d10c1ee30e00201142b32 100755 (executable)
@@ -1,17 +1,30 @@
 #!/bin/sh
 set -e
 set -x
-cd pdns-recursor-$1
+
+if [ -z "$1" ]; then
+  VERSION=$(git describe --always --dirty=+ 2>/dev/null || true)
+  if [ -z "$VERSION" ]; then
+    VERSION="UNKNOWN"
+  else
+    VERSION="git-"$VERSION
+  fi
+  DIST_HOST="$(id -u -n)@$(hostname -f || hostname)"
+else
+  VERSION=$1
+fi
+
+cd pdns-recursor-$VERSION
 export DEBFULLNAME="PowerDNS.COM BV"
-if echo $1 | grep -q ^git
+if echo $VERSION | grep -q ^git
 then
-       DEBPKGNAME=pdns-recursor_0.0-$1
+       DEBPKGNAME=pdns-recursor_0.0-$VERSION
 else
-       DEBPKGNAME=pdns-recursor_$1
+       DEBPKGNAME=pdns-recursor_$VERSION
 fi
-dh_make -e powerdns.support@powerdns.com -s -f ../pdns-recursor-$1.tar.bz2 -p $DEBPKGNAME < /dev/null
+dh_make -e powerdns.support@powerdns.com -s -f ../pdns-recursor-$VERSION.tar.bz2 -p $DEBPKGNAME < /dev/null
 cp pdns-recursor.init.d debian/init.d
-#[ -e debian/control ] || dh_make -e powerdns.support@powerdns.com -s -r cdbs  -f ../pdns-recursor-$1.tar.bz2  < /dev/null
+#[ -e debian/control ] || dh_make -e powerdns.support@powerdns.com -s -r cdbs  -f ../pdns-recursor-$VERSION.tar.bz2  < /dev/null
 perl -i -pe 's/Description: <.*>/Description: extremely powerful and versatile recursing nameserver/' debian/control
 # only to be nice to people usind the generated .dsc
 perl -i -pe 's/(Build-Depends: .*)/$1, libboost-dev, libboost-serialization-dev, liblua5.1-0-dev/' debian/control