wok-next annotate pdnsd/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d5aab818505e
children
rev   line source
al@20534 1 # SliTaz package receipt v2.
pascal@13600 2
pascal@13600 3 PACKAGE="pdnsd"
pascal@13600 4 VERSION="1.2.9a"
pascal@13600 5 CATEGORY="network"
al@20534 6 SHORT_DESC="A proxy DNS server with permanent caching"
pascal@13600 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
al@21032 9 WEB_SITE="http://members.home.nl/p.a.rombouts/pdnsd/"
al@20534 10
pascal@13600 11 TARBALL="$PACKAGE-$VERSION-par.tar.gz"
al@21032 12 WGET_URL="${WEB_SITE}releases/$TARBALL"
pascal@13600 13
al@20534 14 compile_rules() {
al@20534 15 ./configure $CONFIGURE_ARGS &&
al@20534 16 make &&
al@21020 17 make DESTDIR=$install install || return 1
pascal@13600 18
al@20534 19 mv $install/etc/pdnsd.conf.sample $install/etc/pdnsd.conf
pascal@13600 20 }
pascal@13600 21
al@20534 22 genpkg_rules() {
al@20534 23 copy @std
al@20534 24 CONFIG_FILES="/etc/pdnsd.conf"
pascal@13600 25 }
pascal@13601 26
al@20534 27 pre_remove() {
pascal@18730 28 sed -i 's/pdnsd//' "$1/etc/rcS.conf"
pascal@18730 29 rm -f "$1/etc/init.d/pdnsd"
pascal@13601 30 }
pascal@13601 31
al@20534 32 post_install() {
pascal@13601 33 local tmp
al@20534 34
pascal@13601 35 tmp=$(route -n | awk '/^0.0.0.0/ { print $8; }')
pascal@18730 36 [ -n "$tmp" ] && sed -i "s/eth0/$tmp/" "$1/etc/pdnsd.conf"
al@20534 37
pascal@13601 38 tmp=$(sed '/nameserver/!d;s/nameserver //;q' < /etc/resolv.conf)
pascal@18730 39 [ -n "$tmp" ] && sed -i "s/192\.168\.0\.1/$tmp/" "$1/etc/pdnsd.conf"
al@20534 40
al@20534 41 ln -s daemon "$1/etc/init.d/pdnsd"
al@20534 42
al@20534 43 [ -n "$quiet" ] || cat <<EOT
al@20534 44
al@20534 45 .-----------------------------------------------.
al@20534 46 | Now you can check /etc/pdnsd.conf |
al@20534 47 | and add pdnsd to RUN_DAEMONS in /etc/rcS.conf |
al@20534 48 '-----------------------------------------------'
pascal@13601 49 EOT
pascal@13601 50 }