/
build-recursor
executable file
·33 lines (30 loc) · 1.16 KB
/
build-recursor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -e
set -x
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 2>/dev/null || hostname 2>/dev/null || echo localhost)"
else
VERSION=$1
fi
cd pdns-recursor-$VERSION
export DEBFULLNAME="PowerDNS.COM BV"
DEBPKGNAME=pdns-recursor_$VERSION
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-$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.2-0-dev/' debian/control
# Fix the rpm version number
perl -i -pe "s/Version: .*/Version: ${VERSION}/" pdns-recursor.spec
export LUA=1
export STATIC=semi
./configure
fakeroot debian/rules binary
fakeroot rpmbuild -bb pdns-recursor.spec