wok view pdnsd/receipt @ rev 14641
hg merge
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Jun 02 16:44:25 2013 +0000 (2013-06-02) |
parents | 07ae6003d013 |
children | 2b9f96603415 |
line source
1 # SliTaz package receipt.
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 WEB_SITE="http://members.home.nl/p.a.rombouts/pdnsd"
9 TARBALL="$PACKAGE-$VERSION-par.tar.gz"
10 WGET_URL="$WEB_SITE/releases/$TARBALL"
11 CONFIG_FILES="/etc/pdnsd.conf"
13 DEPENDS=""
14 BUILD_DEPENDS=""
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr --sysconfdir=/etc $CONFIGURE_ARGS &&
21 make && make DESTDIR=$DESTDIR install
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 cp -a $install/* $fs
28 rm -rf $fs/usr/share
29 mv $fs/etc/pdnsd.conf.sample $fs/etc/pdnsd.conf
30 }
32 # Pre and post install commands for Tazpkg.
33 pre_remove()
34 {
35 sed -i 's/pdnsd//' $1/etc/rcS.conf
36 rm -f $1/etc/init.d/pdnsd
37 }
39 post_install()
40 {
41 local tmp
42 tmp=$(route -n | awk '/^0.0.0.0/ { print $8; }')
43 [ -n "$tmp" ] && sed -i "s/eth0/$tmp/" $1/etc/pdnsd.conf
44 tmp=$(sed '/nameserver/!d;s/nameserver //;q' < /etc/resolv.conf)
45 [ -n "$tmp" ] && sed -i "s/192\.168\.0\.1/$tmp/" $1/etc/pdnsd.conf
46 tmp=
47 [ -s $1/etc/init.d/daemon ] && ln -s daemon $1/etc/init.d/pdnsd &&
48 tmp=" and add pdnsd to RUN_DAEMONS in /etc/rcS.conf"
49 cat <<EOT
50 Now you can check /etc/pdnsd.conf$tmp.
51 EOT
52 }