wok-next view pdnsd/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 757d032c55c7
children 5ffe59e2de3a
line source
1 # SliTaz package receipt v2.
3 PACKAGE="pdnsd"
4 VERSION="1.2.9a"
5 CATEGORY="network"
6 SHORT_DESC="A proxy DNS server with permanent caching"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://members.home.nl/p.a.rombouts/pdnsd"
11 TARBALL="$PACKAGE-$VERSION-par.tar.gz"
12 WGET_URL="$WEB_SITE/releases/$TARBALL"
14 compile_rules() {
15 ./configure $CONFIGURE_ARGS &&
16 make &&
17 make DESTDIR=$install install || return 1
19 mv $install/etc/pdnsd.conf.sample $install/etc/pdnsd.conf
20 }
22 genpkg_rules() {
23 copy @std
24 CONFIG_FILES="/etc/pdnsd.conf"
25 }
27 pre_remove() {
28 sed -i 's/pdnsd//' "$1/etc/rcS.conf"
29 rm -f "$1/etc/init.d/pdnsd"
30 }
32 post_install() {
33 local tmp
35 tmp=$(route -n | awk '/^0.0.0.0/ { print $8; }')
36 [ -n "$tmp" ] && sed -i "s/eth0/$tmp/" "$1/etc/pdnsd.conf"
38 tmp=$(sed '/nameserver/!d;s/nameserver //;q' < /etc/resolv.conf)
39 [ -n "$tmp" ] && sed -i "s/192\.168\.0\.1/$tmp/" "$1/etc/pdnsd.conf"
41 ln -s daemon "$1/etc/init.d/pdnsd"
43 [ -n "$quiet" ] || cat <<EOT
45 .-----------------------------------------------.
46 | Now you can check /etc/pdnsd.conf |
47 | and add pdnsd to RUN_DAEMONS in /etc/rcS.conf |
48 '-----------------------------------------------'
49 EOT
50 }