47 lines
721 B
Bash
Executable file
47 lines
721 B
Bash
Executable file
#!/bin/bash
|
|
|
|
IFS=$'\n'
|
|
set -eu -o pipefail
|
|
|
|
echo
|
|
echo '==> Checking deps'
|
|
which git
|
|
which autoreconf
|
|
which make
|
|
which gcc || which clang
|
|
|
|
echo
|
|
echo '==> Cloning repo'
|
|
if ! [ -e bind9 ]; then
|
|
git clone --single-branch --depth 1 https://gitlab.isc.org/isc-projects/bind9.git bind9
|
|
else
|
|
echo ' ** bind9/ already exists'
|
|
fi
|
|
|
|
cd bind9
|
|
export CFLAGS="-O3" CPPFLAGS="-O3"
|
|
|
|
echo
|
|
echo '==> autoreconf -fi'
|
|
autoreconf -fi
|
|
|
|
echo
|
|
echo '==> ./configure (check deps, generate config)'
|
|
./configure \
|
|
--with-jemalloc \
|
|
--disable-doh \
|
|
--disable-geoip \
|
|
--with-libxml2=no \
|
|
--with-json-c=no \
|
|
--with-libsystemd=no \
|
|
--with-zlib=no
|
|
|
|
echo
|
|
echo '==> make'
|
|
make -j$(nproc)
|
|
|
|
unset CFLAGS CPPFLAGS
|
|
cd ..
|
|
|
|
echo
|
|
echo '==> Done'
|