]> git.ipfire.org Git - thirdparty/pdns.git/blob - build-scripts/dist-recursor
hook up the validator code with the recursor, keep toysdig independent so it can...
[thirdparty/pdns.git] / build-scripts / dist-recursor
1 #!/usr/bin/env bash
2
3 set -e
4
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 if [ -z "$VERSION" ]; then
11 VERSION=$(./build-aux/gen-version)
12 if [ -z "$VERSION" ]; then
13 VERSION="UNKNOWN"
14 fi
15 fi
16
17 set -x
18
19 cd pdns
20
21 ragel dnslabeltext.rl -o dnslabeltext.cc
22
23 cd ../docs
24 pandoc -s -t man manpages/pdns_recursor.1.md -o pdns_recursor.1
25 pandoc -s -t man manpages/rec_control.1.md -o rec_control.1
26 cd -
27
28 DIST_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)"
29
30 INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \
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 \
33 sstuff.hh mtasker.hh mtasker.cc lwres.hh logger.hh pdnsexception.hh \
34 mplexer.hh pubsuffix.hh mbedtlscompat.hh \
35 dns_random.hh lua-pdns.hh lua-recursor.hh namespaces.hh \
36 recpacketcache.hh base32.hh cachecleaner.hh json.hh version.hh \
37 ws-recursor.hh ws-api.hh secpoll-recursor.hh \
38 responsestats.hh webserver.hh dnsname.hh dnspacket.hh ednssubnet.hh \
39 filterpo.hh rpzloader.hh ixfr.hh gss_context.hh resolver.hh dnssecinfra.hh \
40 dnsseckeeper.hh statbag.hh ueberbackend.hh sha.hh dnsbackend.hh comment.hh \
41 validate.hh validate-recursor.hh"
42
43 CFILES="syncres.cc iputils.cc misc.cc unix_utility.cc qtype.cc \
44 logger.cc arguments.cc lwres.cc pdns_recursor.cc lua-iputils.cc \
45 recursor_cache.cc dnsparser.cc dnswriter.cc dnsrecords.cc rcpgenerator.cc \
46 base64.cc zoneparser-tng.cc rec_channel.cc rec_channel_rec.cc rec_control.cc \
47 selectmplexer.cc epollmplexer.cc kqueuemplexer.cc portsmplexer.cc pdns_hw.cc \
48 sillyrecords.cc pubsuffix.cc lua-pdns.cc lua-recursor.cc randomhelper.cc \
49 devpollmplexer.cc recpacketcache.cc dns.cc reczones.cc base32.cc nsecrecords.cc \
50 dnslabeltext.cc json.cc ws-recursor.cc ws-api.cc version.cc dns_random.cc \
51 responsestats.cc webserver.cc rec-carbon.cc secpoll-recursor.cc dnsname.cc \
52 filterpo.cc rpzloader.cc ixfr.cc dnssecinfra.cc gss_context.cc resolver.cc \
53 ednssubnet.cc validate.cc validate-recursor.cc mbedtlssigners.cc"
54
55 ./mkpubsuffixcc
56
57 DIRNAME=pdns-recursor-$VERSION
58 rm -rf $DIRNAME
59 mkdir $DIRNAME
60 cp $INCLUDES $CFILES $DIRNAME
61 cp Makefile-recursor $DIRNAME/Makefile.in
62 cp README-recursor $DIRNAME/README
63 cp ../COPYING ../NOTICE $DIRNAME/
64 cp config-recursor.h $DIRNAME/config.h
65 cat >>$DIRNAME/config.h <<EOF
66 #define VERSION "$VERSION"
67 #define DIST_HOST "$DIST_HOST"
68 #define HAVE_BOOST 1
69 #define HAVE_MBEDTLS2 1
70 EOF
71 mkdir -p $DIRNAME/ext/rapidjson/include/rapidjson/internal
72 cp -a ../ext/rapidjson/include/rapidjson/*.h $DIRNAME/ext/rapidjson/include/rapidjson/
73 cp -a ../ext/rapidjson/include/rapidjson/internal/*.h $DIRNAME/ext/rapidjson/include/rapidjson/internal
74 mkdir -p $DIRNAME/ext/mbedtls/include/mbedtls
75 cp -a ../ext/mbedtls/include/mbedtls/{config.h,check_config.h,aes.h,ripemd160.h,sha1.h,md.h,md5.h,sha256.h,sha512.h,md_internal.h} ../ext/mbedtls/include/mbedtls/base64.h ../ext/mbedtls/include/mbedtls/platform.h ../ext/mbedtls/include/mbedtls/version.h $DIRNAME/ext/mbedtls/include/mbedtls
76 cp -a ../ext/mbedtls/include/mbedtls/{entropy.h,ctr_drbg.h,rsa.h,ecp.h,bignum.h,oid.h,asn1.h,pk.h,ecdsa.h,cipher.h,x509.h} $DIRNAME/ext/mbedtls/include/mbedtls
77 cp -a ../ext/mbedtls/include/mbedtls/{bn_mul.h,config.h,entropy_poll.h,timing.h} $DIRNAME/ext/mbedtls/include/mbedtls
78
79 mkdir -p $DIRNAME/ext/mbedtls/library
80 cp -a ../ext/mbedtls/library/{aes.c,base64.c,md.c,md_wrap.c,md5.c,sha1.c,sha256.c,sha512.c,ripemd160.c} $DIRNAME/ext/mbedtls/library
81 cp -a ../ext/mbedtls/library/{rsa.c,bignum.c,oid.c,asn1parse.c,ctr_drbg.c,entropy.c,entropy_poll.c,timing.c} $DIRNAME/ext/mbedtls/library
82
83 cp -a ../ext/yahttp/ $DIRNAME/ext/yahttp
84 echo '#include "../../../config.h"' > $DIRNAME/ext/yahttp/yahttp/yahttp-config.h
85 mkdir $DIRNAME/rrd
86 cp tools/rrd/{create,update,makegraphs,index.html} $DIRNAME/rrd
87 cp dnslabeltext.rl $DIRNAME
88 cp pdns-recursor.init.d $DIRNAME
89 cp ../docs/pdns_recursor.1 ../docs/rec_control.1 $DIRNAME
90 cp configure-recursor $DIRNAME/configure
91 cp powerdns-example-script.lua $DIRNAME
92 mkdir -p $DIRNAME/contrib
93 cp ../contrib/systemd-pdns-recursor.service $DIRNAME/contrib
94 cp ../build-scripts/build-recursor-semistatic $DIRNAME/build-scripts
95 cp pdns-recursor.spec $DIRNAME
96
97 mkdir -p $DIRNAME/sysdeps
98 rm -f sysdeps-recursor/*~
99 cp sysdeps-recursor/* $DIRNAME/sysdeps
100 touch $DIRNAME/dnslabeltext.cc # avoid spurious recompiles
101 tar cf $DIRNAME.tar $DIRNAME
102 bzip2 -f $DIRNAME.tar # .. solaris