52 lines
751 B
Bash
52 lines
751 B
Bash
|
#!/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'
|