]>
Commit | Line | Data |
---|---|---|
e30c4f26 BH |
1 | #!/usr/bin/env bash |
2 | ||
68c12f0b PD |
3 | set -e |
4 | ||
5c5e149a PL |
5 | if [ "$0" != "./build-scripts/dist-recursor" ]; then |
6 | echo "Please run me from the root checkout dir" | |
7 | exit 1 | |
8 | fi | |
9 | ||
10 | cd pdns | |
11 | ||
6f50a695 | 12 | ragel dnslabeltext.rl -o dnslabeltext.cc |
94a4b8a1 PD |
13 | |
14 | cd ../docs | |
15 | pandoc -s -t man manpages/pdns_recursor.1.md -o pdns_recursor.1 | |
16 | pandoc -s -t man manpages/rec_control.1.md -o rec_control.1 | |
17 | cd - | |
ba1a571d CH |
18 | |
19 | if [ -z "$VERSION" ]; then | |
d5255946 | 20 | VERSION=$(git describe --always --dirty=+ 2>/dev/null || true) |
ba1a571d CH |
21 | if [ -z "$VERSION" ]; then |
22 | VERSION="UNKNOWN" | |
23 | else | |
24 | VERSION="git-"$VERSION | |
25 | fi | |
ba1a571d | 26 | fi |
2353fffa | 27 | |
5c5e149a PL |
28 | DIST_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)" |
29 | ||
97ebd70d | 30 | INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \ |
bd7f05fa BH |
31 | rcpgenerator.hh lock.hh dnswriter.hh dnsrecords.hh dnsparser.hh utility.hh \ |
32 | recursor_cache.hh rec_channel.hh qtype.hh misc.hh dns.hh syncres.hh \ | |
129c9965 | 33 | sstuff.hh mtasker.hh mtasker.cc lwres.hh logger.hh pdnsexception.hh \ |
92011b8f | 34 | mplexer.hh pubsuffix.hh \ |
6f7e8bd4 | 35 | dns_random.hh lua-pdns.hh lua-recursor.hh namespaces.hh \ |
09425ce1 | 36 | recpacketcache.hh base32.hh cachecleaner.hh json.hh version.hh \ |
d67620e4 | 37 | ws-recursor.hh ws-api.hh secpoll-recursor.hh \ |
d926c0da | 38 | responsestats.hh webserver.hh dnsname.hh" |
bd7f05fa | 39 | |
3e3f0358 | 40 | CFILES="syncres.cc iputils.cc misc.cc unix_utility.cc qtype.cc \ |
24fdd491 | 41 | logger.cc arguments.cc lwres.cc pdns_recursor.cc lua-iputils.cc \ |
bd7f05fa | 42 | recursor_cache.cc dnsparser.cc dnswriter.cc dnsrecords.cc rcpgenerator.cc \ |
6dcd28c3 | 43 | base64.cc zoneparser-tng.cc rec_channel.cc rec_channel_rec.cc rec_control.cc \ |
9d558e14 | 44 | selectmplexer.cc epollmplexer.cc kqueuemplexer.cc portsmplexer.cc pdns_hw.cc \ |
92011b8f | 45 | sillyrecords.cc pubsuffix.cc lua-pdns.cc lua-recursor.cc randomhelper.cc \ |
c717c7f9 | 46 | devpollmplexer.cc recpacketcache.cc dns.cc reczones.cc base32.cc nsecrecords.cc \ |
6ec5e728 | 47 | dnslabeltext.cc json.cc ws-recursor.cc ws-api.cc version.cc dns_random.cc \ |
d926c0da | 48 | responsestats.cc webserver.cc rec-carbon.cc secpoll-recursor.cc dnsname.cc" |
bd7f05fa | 49 | |
c363d53a | 50 | ./mkpubsuffixcc |
0a3a6f9d | 51 | |
2353fffa BH |
52 | DIRNAME=pdns-recursor-$VERSION |
53 | rm -rf $DIRNAME | |
54 | mkdir $DIRNAME | |
55 | cp $INCLUDES $CFILES $DIRNAME | |
8d0354b1 | 56 | cp Makefile-recursor $DIRNAME/Makefile.in |
2353fffa | 57 | cp README-recursor $DIRNAME/README |
0882970e | 58 | cp ../COPYING ../NOTICE $DIRNAME/ |
2353fffa | 59 | cp config-recursor.h $DIRNAME/config.h |
ba1a571d CH |
60 | cat >>$DIRNAME/config.h <<EOF |
61 | #define VERSION "$VERSION" | |
62 | #define DIST_HOST "$DIST_HOST" | |
b261f0fb | 63 | #define HAVE_BOOST 1 |
ba1a571d | 64 | EOF |
91b9077d | 65 | mkdir -p $DIRNAME/ext/rapidjson/include/rapidjson/internal |
d4cc4c4a RK |
66 | cp -a ../ext/rapidjson/include/rapidjson/*.h $DIRNAME/ext/rapidjson/include/rapidjson/ |
67 | cp -a ../ext/rapidjson/include/rapidjson/internal/*.h $DIRNAME/ext/rapidjson/include/rapidjson/internal | |
f4b482a0 | 68 | mkdir -p $DIRNAME/ext/polarssl/include/polarssl |
d4cc4c4a | 69 | cp -a ../ext/polarssl/include/polarssl/config.h ../ext/polarssl/include/polarssl/check_config.h ../ext/polarssl/include/polarssl/aes.h ../ext/polarssl/include/polarssl/base64.h ../ext/polarssl/include/polarssl/platform.h ../ext/polarssl/include/polarssl/version.h $DIRNAME/ext/polarssl/include/polarssl |
f4b482a0 | 70 | mkdir -p $DIRNAME/ext/polarssl/library |
d4cc4c4a RK |
71 | cp -a ../ext/polarssl/library/aes.c ../ext/polarssl/library/base64.c $DIRNAME/ext/polarssl/library |
72 | cp -a ../ext/yahttp/ $DIRNAME/ext/yahttp | |
b261f0fb | 73 | echo '#include "../../../config.h"' > $DIRNAME/ext/yahttp/yahttp/yahttp-config.h |
2353fffa BH |
74 | mkdir $DIRNAME/rrd |
75 | cp tools/rrd/{create,update,makegraphs,index.html} $DIRNAME/rrd | |
0a6b1027 | 76 | cp dnslabeltext.rl $DIRNAME |
0a3a6f9d | 77 | cp pdns-recursor.init.d $DIRNAME |
94a4b8a1 | 78 | cp ../docs/pdns_recursor.1 ../docs/rec_control.1 $DIRNAME |
cd553f6c | 79 | cp configure-recursor $DIRNAME/configure |
bccdd9b7 | 80 | cp powerdns-example-script.lua $DIRNAME |
1f7f745a PD |
81 | mkdir -p $DIRNAME/contrib |
82 | cp ../contrib/systemd-pdns-recursor.service $DIRNAME/contrib | |
36c7f154 | 83 | mkdir -p $DIRNAME/build-scripts/redhat |
5c5e149a | 84 | cp ../build-scripts/build-recursor $DIRNAME/build-scripts |
36c7f154 | 85 | cp ../build-scripts/redhat/pdns-recursor-test.spec $DIRNAME/build-scripts/redhat |
a4e9add5 | 86 | cp pdns-recursor.spec $DIRNAME |
bd7f05fa | 87 | |
6f50a695 | 88 | mkdir -p $DIRNAME/sysdeps |
927c12b0 | 89 | rm -f sysdeps-recursor/*~ |
6f50a695 | 90 | cp sysdeps-recursor/* $DIRNAME/sysdeps |
d8e23778 | 91 | touch $DIRNAME/dnslabeltext.cc # avoid spurious recompiles |
6dcd28c3 BH |
92 | tar cf $DIRNAME.tar $DIRNAME |
93 | bzip2 -f $DIRNAME.tar # .. solaris |