wok-next annotate bind/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents b156aee559a7
children 8459b1de4897
rev   line source
al@19736 1 # SliTaz package receipt v2.
pascal@1612 2
pascal@1612 3 PACKAGE="bind"
al@19736 4 VERSION="9.11.1"
pascal@1612 5 CATEGORY="network"
al@19736 6 SHORT_DESC="BIND DNS server"
pascal@1612 7 MAINTAINER="pascal.bellard@slitaz.org"
al@19736 8 LICENSE="MPL2"
al@19736 9 WEB_SITE="http://www.isc.org/downloads/BIND/"
pascal@1612 10
al@19736 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19736 12 WGET_URL="http://ftp.isc.org/isc/bind9/$VERSION/$TARBALL"
al@19736 13
pascal@19449 14 BUILD_DEPENDS="libtool libcap-dev openssl-dev perl krb5-dev readline-dev"
al@21020 15 SPLIT="$PACKAGE-client libbind $PACKAGE-dev"
slaxemulator@10709 16
al@20534 17 compile_rules() {
al@21020 18 mkdir -p $install/etc/bind
al@20534 19
al@19736 20 ./configure \
al@19736 21 --sysconfdir=/etc/bind \
al@19736 22 --enable-threads \
al@19736 23 --disable-static \
al@19736 24 --with-libtool \
al@19736 25 --with-openssl \
al@19736 26 --with-randomdev=/dev/urandom \
al@19736 27 $CONFIGURE_ARGS &&
al@20569 28 fix libtool &&
al@20534 29 make &&
al@21020 30 make DESTDIR=$install install || return 1
al@19736 31
al@21020 32 LD_LIBRARY_PATH=$install/usr/lib \
al@21020 33 $install/usr/bin/dig ns . @a.root-servers.net. > $install/etc/bind/db.root
al@19736 34
al@19736 35 cp -a $stuff/etc $install
al@19736 36 chown -R root:root $install/etc
al@19736 37
al@19736 38 docdir=$install/usr/share/doc/bind-$VERSION
al@19736 39 mkdir -p $docdir/arm $docdir/misc
al@19736 40 cp doc/arm/*.html $docdir/arm
al@19736 41 cd doc/misc
al@19736 42 cp dnssec ipv6 migrat* options rfc-compliance roadmap sdb $docdir/misc
pascal@1612 43 }
pascal@1612 44
al@20534 45 genpkg_rules() {
al@19736 46 case $PACKAGE in
al@19736 47 bind)
al@19736 48 CONFIG_FILES="/etc/bind/"
al@19736 49 copy etc/ sbin/
al@20799 50 DEPENDS="libbind libcap openssl"
al@20534 51 TAZPANEL_DAEMON="edit::/etc/bind/named.conf|man|options|web::$WEB_SITE"
al@20534 52 TAGS="DNS daemon"
al@19736 53 ;;
al@19736 54 bind-client)
al@19736 55 copy bin/; rm $fs/usr/bin/bind9-config
al@19736 56 CAT="network|client"
al@20799 57 DEPENDS="libbind libkrb5 readline"
al@19736 58 ;;
al@19736 59 libbind)
al@19736 60 copy *.so*
al@19736 61 CAT="libdevel|shared libraries"
al@20799 62 DEPENDS="libkrb5 openssl"
al@19736 63 ;;
al@19736 64 bind-dev)
al@19736 65 copy @dev
al@19736 66 ;;
al@19736 67 esac
pascal@1612 68 }
pascal@1612 69
al@20534 70 post_install_bind() {
al@19736 71 mkdir -p "$1/var/cache/bind"
al@19736 72
pascal@17283 73 localnets="192.168.0.0/16; 127.0.0.1;"
pascal@18730 74 grep -qs allow-recursion "$1/etc/bind/named.conf.options" ||
pascal@17283 75 sed -i "s/.*directory.*/\\tallow-recursion { $localnets };\\n&/" \
pascal@18730 76 "$1/etc/bind/named.conf.options"
pascal@18898 77 #[ -x "$1/usr/bin/ssh-keygen" ] &&
pascal@18898 78 #chroot "$1/" "hostname -f | xargs ssh-keygen -r" | \
pascal@18898 79 # sed 's/^/update add /;s/ IN / 3600&/;/ SSHFP . 1 /d;' \
pascal@18898 80 #chroot "$1/" nsupdate
pascal@17283 81 }