Add a uname.bind builtin zone
[ipreg/bind9.git] / Build.sh
1 #!/bin/sh
2
3 set -e
4
5 if [ -t 1 ]
6 then
7 "$0" 2>&1 | tee -a Build.log
8 exit $?
9 fi
10
11 . ./version
12 case $RELEASETYPE in
13 (pre-alpha)
14 PKG=bind-${MAJORVER}.${MINORVER}
15 ;;
16 (*) PKG=bind-${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}
17 ;;
18 esac
19 VER=0
20 while :; do
21 PREFIX=/opt/$PKG+$VER
22 [ -d $PREFIX+* ] || break
23 VER=`expr $VER + 1`
24 done
25 PREFIX=$PREFIX+$(git rev-parse --short HEAD)
26
27 echo ========================================================================
28 echo ==
29 echo == $(date +%Y-%m-%d.%H:%M:%S%z) $PREFIX start
30 echo ==
31
32 mkdir -p $PREFIX/bin $PREFIX/doc $PREFIX/man/man1
33 ln -s bin $PREFIX/sbin
34
35 cd ../fstrm
36
37 git clean -d -f -x
38 ./autogen.sh
39 ./configure --prefix=$PREFIX --mandir=$PREFIX/man
40 make -j20 all
41 make install
42
43 cd -
44
45 ./configure --enable-threads --enable-shared \
46 --enable-symtable=all --enable-warn-shadow --enable-warn-error \
47 --enable-dnstap --enable-querytrace \
48 --with-dlopen --with-libtool \
49 --with-libjson --with-lmdb --with-openssl \
50 --with-readline --with-libxml2 --with-zlib \
51 --with-libfstrm=$PREFIX \
52 --with-randomdev=/dev/urandom \
53 --without-pkcs11 --without-gssapi --without-gost \
54 --prefix=$PREFIX --mandir=$PREFIX/man \
55 --localstatedir=/var/opt/bind/var \
56 --sysconfdir=/var/opt/bind/etc
57
58 LD_RUN_PATH=$PREFIX/lib make -j20 all
59 make install
60
61 cp doc/arm/*.html doc/arm/Bv9ARM.pdf $PREFIX/doc
62
63 ln -s /var/opt/bind $PREFIX/var
64 ln -s /var/opt/bind/etc $PREFIX/etc
65 ln -s /var/opt/bind/log $PREFIX/log
66 ln -s /var/opt/bind/run $PREFIX/run
67
68 for d in nsdiff nsnotifyd
69 do cd ../$d
70 [ -f configure ] && ./configure
71 make install bindir=$PREFIX/bin mandir=$PREFIX/man
72 cd -
73 done
74
75 echo ==
76 echo == $(date +%Y-%m-%d.%H:%M:%S%z) $PREFIX done
77 echo ==
78 echo ========================================================================