diff options
Diffstat (limited to 'source/n/bind/bind.SlackBuild')
-rwxr-xr-x | source/n/bind/bind.SlackBuild | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/source/n/bind/bind.SlackBuild b/source/n/bind/bind.SlackBuild index 783ef548a..47a606d5b 100755 --- a/source/n/bind/bind.SlackBuild +++ b/source/n/bind/bind.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021, 2023 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=bind VERSION=${VERSION:-$(echo ${PKGNAM}-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -76,7 +76,7 @@ find . \ -exec chmod 644 {} \+ # Detect krb5: -if ls /lib*/libgssapi_krb5* 1> /dev/null 2> /dev/null ; then +if pkg-config --exists krb5-gssapi 1> /dev/null 2> /dev/null ; then GSSAPI=" --with-gssapi " else GSSAPI=" " @@ -106,21 +106,30 @@ make install DESTDIR=$PKG || exit 1 # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +# These probably were not supposed to be installed: +find . -name .deps -exec rm -rf "{}" \; +find . -name .libs -exec rm -rf "{}" \; + # We like symlinks. ( cd $PKG/usr/sbin ln -sf named lwresd ) # We like a lot of symlinks. -( cd $PKG/usr/man/man3 - sh $CWD/3link.sh -) +if [ -d $PKG/usr/man/man3 ]; then + ( cd $PKG/usr/man/man3 + sh $CWD/3link.sh + ) +fi # Install init script: mkdir -p $PKG/etc/rc.d cp -a $CWD/rc.bind $PKG/etc/rc.d/rc.bind.new chmod 644 $PKG/etc/rc.d/rc.bind.new +# Install default options file for named: +cat $CWD/default.named > $PKG/etc/default/named.new + # Fix library perms: chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/* @@ -128,11 +137,6 @@ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/* find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -# Symlink hardlinked man pages: -( cd $PKG/usr/man/man1 - ln -sf isc-config.sh.1 bind9-config.1 -) - # Compress manual pages: find $PKG/usr/man -type f -exec gzip -9 {} \+ for i in $( find $PKG/usr/man -type l ) ; do @@ -148,7 +152,9 @@ cp -a \ $PKG/usr/doc/${PKGNAM}-$VERSION # This one should have the correct perms of the config file: -chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample +if [ -r $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample ]; then + chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample +fi # One format of this is plenty. Especially get rid of the bloated PDF. ( cd $PKG/usr/doc/bind-$VERSION/arm @@ -157,13 +163,18 @@ chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample # Add sample config files for a simple caching nameserver: mkdir -p $PKG/var/named/caching-example -cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new -cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone -cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local -cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.root +cp -a $CWD/caching-example/named.conf $PKG/etc/named.conf.new +cp -a $CWD/caching-example/localhost.zone $PKG/var/named/caching-example/localhost.zone +cp -a $CWD/caching-example/named.local $PKG/var/named/caching-example/named.local +cp -a $CWD/caching-example/named.root $PKG/var/named/caching-example/named.root # This name is deprecated, but having it here doesn't hurt in case # an old configuration file wants it: -cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.ca +cp -a $CWD/caching-example/named.root $PKG/var/named/caching-example/named.ca +chown root:root $PKG/etc/named.conf.new +chmod 644 $PKG/var/named/caching-example/* + +# Make sure that everything in /var/named is owned by named:named: +chown -R named:named $PKG/var/named mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh @@ -171,4 +182,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz - |