diff --git a/.gitignore b/.gitignore index 0c8474b..a7fa26a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +/bind9 +/ldns /hickory-dns + /unbound.log diff --git a/build_dig.sh b/build_dig.sh new file mode 100755 index 0000000..89bede2 --- /dev/null +++ b/build_dig.sh @@ -0,0 +1,47 @@ +#!/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' diff --git a/build_drill.sh b/build_drill.sh new file mode 100755 index 0000000..8d91f9c --- /dev/null +++ b/build_drill.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +IFS=$'\n' +set -eu -o pipefail + +echo +echo '==> Checking deps' +which git +which libtoolize +which autoreconf +which make +which gcc || which clang + +echo +echo '==> Cloning repo' +if ! [ -e ldns ]; then + git clone --single-branch --depth 1 --recurse-submodules https://github.com/NLnetLabs/ldns.git ldns +else + echo ' ** ldns/ already exists' +fi + +cd ldns +export CFLAGS="-O3" + +echo +echo '==> libtoolize -ci' +libtoolize -ci + +echo +echo '==> autoreconf -fi' +autoreconf -fi + +echo +echo '==> ./configure (check deps, generate config)' +./configure \ + --with-drill \ + --without-pyldns \ + --without-pyldnsx \ + --enable-poll \ + --disable-gost \ + --disable-dane + +echo +echo '==> make' +make -j$(nproc || echo 4) + +unset CFLAGS +cd .. + +echo +echo '==> Done'