wok-current view pdnsd/receipt @ rev 17473
syslinux/iso2exe: add 64bits support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 27 17:56:57 2014 +0100 (2014-12-27) |
parents | 890593feb2f7 |
children | 9e01bc6321ea |
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 LICENSE="GPL3"
9 WEB_SITE="http://members.home.nl/p.a.rombouts/pdnsd"
10 TARBALL="$PACKAGE-$VERSION-par.tar.gz"
11 WGET_URL="$WEB_SITE/releases/$TARBALL"
12 CONFIG_FILES="/etc/pdnsd.conf"
14 DEPENDS=""
15 BUILD_DEPENDS=""
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --prefix=/usr --sysconfdir=/etc $CONFIGURE_ARGS &&
22 make && make DESTDIR=$DESTDIR install
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 cp -a $install/* $fs
29 rm -rf $fs/usr/share
30 mv $fs/etc/pdnsd.conf.sample $fs/etc/pdnsd.conf
31 }
33 # Pre and post install commands for Tazpkg.
34 pre_remove()
35 {
36 sed -i 's/pdnsd//' $1/etc/rcS.conf
37 rm -f $1/etc/init.d/pdnsd
38 }
40 post_install()
41 {
42 local tmp
43 tmp=$(route -n | awk '/^0.0.0.0/ { print $8; }')
44 [ -n "$tmp" ] && sed -i "s/eth0/$tmp/" $1/etc/pdnsd.conf
45 tmp=$(sed '/nameserver/!d;s/nameserver //;q' < /etc/resolv.conf)
46 [ -n "$tmp" ] && sed -i "s/192\.168\.0\.1/$tmp/" $1/etc/pdnsd.conf
47 tmp=
48 [ -s $1/etc/init.d/daemon ] && ln -s daemon $1/etc/init.d/pdnsd &&
49 tmp=" and add pdnsd to RUN_DAEMONS in /etc/rcS.conf"
50 cat <<EOT
51 Now you can check /etc/pdnsd.conf$tmp.
52 EOT
53 }