]> git.ipfire.org Git - thirdparty/pdns.git/blame - pdns/dist-recursor
Merge pull request #796 from zeha/f/makefile-recursor
[thirdparty/pdns.git] / pdns / dist-recursor
CommitLineData
e30c4f26
BH
1#!/usr/bin/env bash
2
68c12f0b
PD
3set -e
4
6f50a695
PD
5ragel dnslabeltext.rl -o dnslabeltext.cc
6
ba1a571d
CH
7## The following lines will be patched by set-version-recursor.
8VERSION=""
9DIST_HOST=""
10## End patch area.
11
12if [ -z "$VERSION" ]; then
13 VERSION=$(git describe --always --dirty=+ 2>/dev/null)
14 if [ -z "$VERSION" ]; then
15 VERSION="UNKNOWN"
16 else
17 VERSION="git-"$VERSION
18 fi
19 DIST_HOST="$(id -u -n)@$(hostname -f)"
20fi
2353fffa 21
97ebd70d 22INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \
bd7f05fa
BH
23rcpgenerator.hh lock.hh dnswriter.hh dnsrecords.hh dnsparser.hh utility.hh \
24recursor_cache.hh rec_channel.hh qtype.hh misc.hh dns.hh syncres.hh \
6dcd28c3 25sstuff.hh mtasker.hh mtasker.cc lwres.hh logger.hh ahuexception.hh \
ed22afa3 26mplexer.hh win32_mtasker.hh win32_utility.cc ntservice.hh singleton.hh \
5704e107 27recursorservice.hh dns_random.hh lua-pdns.hh lua-recursor.hh namespaces.hh \
ba1a571d 28recpacketcache.hh base32.hh cachecleaner.hh json.hh version.hh"
bd7f05fa
BH
29
30CFILES="syncres.cc misc.cc unix_utility.cc qtype.cc \
97ebd70d 31logger.cc arguments.cc lwres.cc pdns_recursor.cc \
bd7f05fa 32recursor_cache.cc dnsparser.cc dnswriter.cc dnsrecords.cc rcpgenerator.cc \
6dcd28c3 33base64.cc zoneparser-tng.cc rec_channel.cc rec_channel_rec.cc rec_control.cc \
9d558e14 34selectmplexer.cc epollmplexer.cc kqueuemplexer.cc portsmplexer.cc pdns_hw.cc \
ed22afa3 35win32_mtasker.cc win32_rec_channel.cc win32_logger.cc ntservice.cc \
5704e107 36recursorservice.cc sillyrecords.cc lua-pdns.cc lua-recursor.cc randomhelper.cc \
c717c7f9 37devpollmplexer.cc recpacketcache.cc dns.cc reczones.cc base32.cc nsecrecords.cc \
ba1a571d 38dnslabeltext.cc json.cc json_ws.cc json_ws.hh version.cc"
bd7f05fa 39
0a3a6f9d
BH
40cd docs
41make pdns_recursor.1 rec_control.1
42cd ..
43
2353fffa
BH
44DIRNAME=pdns-recursor-$VERSION
45rm -rf $DIRNAME
46mkdir $DIRNAME
47cp $INCLUDES $CFILES $DIRNAME
48cp Makefile-recursor $DIRNAME/Makefile
9d558e14 49cp Makefile-recursor.win32 $DIRNAME/Makefile.win32
2353fffa 50cp README-recursor $DIRNAME/README
1a133832 51cp ../COPYING $DIRNAME/
2353fffa 52cp config-recursor.h $DIRNAME/config.h
ba1a571d
CH
53cat >>$DIRNAME/config.h <<EOF
54#define VERSION "$VERSION"
55#define DIST_HOST "$DIST_HOST"
56EOF
91b9077d
BH
57mkdir -p $DIRNAME/ext/rapidjson/include/rapidjson/internal
58cp -a ext/rapidjson/include/rapidjson/*.h $DIRNAME/ext/rapidjson/include/rapidjson/
59cp -a ext/rapidjson/include/rapidjson/internal/*.h $DIRNAME/ext/rapidjson/include/rapidjson/internal
2353fffa
BH
60mkdir $DIRNAME/rrd
61cp tools/rrd/{create,update,makegraphs,index.html} $DIRNAME/rrd
6f50a695 62cp aes/*.{c,cc,h} $DIRNAME
0a3a6f9d
BH
63cp pdns-recursor.init.d $DIRNAME
64cp docs/pdns_recursor.1 docs/rec_control.1 $DIRNAME
cd553f6c 65cp configure-recursor $DIRNAME/configure
bccdd9b7 66cp powerdns-example-script.lua $DIRNAME
1f7f745a
PD
67mkdir -p $DIRNAME/contrib
68cp ../contrib/systemd-pdns-recursor.service $DIRNAME/contrib
bd7f05fa 69
6f50a695 70mkdir -p $DIRNAME/sysdeps
927c12b0 71rm -f sysdeps-recursor/*~
6f50a695 72cp sysdeps-recursor/* $DIRNAME/sysdeps
7d7fdcbe 73cp "PowerDNS Recursor.vcproj" $DIRNAME/
6dcd28c3
BH
74tar cf $DIRNAME.tar $DIRNAME
75bzip2 -f $DIRNAME.tar # .. solaris
bd7f05fa 76
7d7fdcbe
BH
77zip -q $DIRNAME.zip $DIRNAME/*
78