wok-current view ppp/receipt @ rev 18302
Up: firefox-official (40.0.2)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Aug 20 14:45:02 2015 +0200 (2015-08-20) |
parents | 5c05d949d429 |
children | 0c85455b2f3b |
line source
1 # SliTaz package receipt.
3 PACKAGE="ppp"
4 VERSION="2.4.7"
5 CATEGORY="network"
6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD GPL"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://ppp.samba.org/"
11 WGET_URL="https://github.com/paulusmack/ppp/archive/$TARBALL"
12 CONFIG_FILES="/etc/ppp"
13 HOST_ARCH="i486 arm"
15 BUILD_DEPENDS="wget"
16 SUGGESTED="tazpanel"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure --prefix=/usr \
22 $CONFIGURE_ARGS &&
23 make &&
24 make DESTDIR=$DESTDIR/usr install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
31 cp -a $install/usr/sbin $fs/usr
32 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
33 cp -a $stuff/pppnc-server $fs/usr/sbin
34 ln $fs/usr/sbin/pppnc-server $fs/usr/sbin/pppnc-client
35 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
36 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
37 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
39 # Config files.
40 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
41 cp $stuff/README.scripts $fs/etc/ppp
42 cp -a $src/etc.ppp/* $fs/etc/ppp
44 # PPP scripts.
45 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
46 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
47 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
48 $fs/etc/ppp/scripts/ppp-on
50 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
51 cp -a $src/scripts/callback $fs/etc/ppp/scripts
52 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
53 cat >> $fs/etc/ppp/ip-up <<EOT
54 #!/bin/sh
56 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
57 . /etc/ppp/ip-up.d/\$6 "\$@"
58 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
59 rm -f /etc/ppp/resolv.prev
60 if [ -f /etc/resolv.conf ]; then
61 cp /etc/resolv.conf /etc/ppp/resolv.prev
62 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
63 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
64 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
65 chmod 644 /etc/resolv.conf
66 else
67 cp /etc/ppp/resolv.conf /etc
68 chmod 644 /etc/resolv.conf
69 fi
70 fi
71 EOT
72 cat >> $fs/etc/ppp/ip-down <<EOT
73 #!/bin/sh
75 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
76 . /etc/ppp/ip-down.d/\$6 "\$@"
77 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
78 if [ -f /etc/ppp/resolv.prev ]; then
79 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
80 chmod 644 /etc/resolv.conf
81 else
82 rm -f /etc/resolv.conf
83 fi
84 fi
85 EOT
86 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
87 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
88 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
90 # insert #!/bin/sh on top line in ip* scripts
91 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
92 # add empty peers dir
93 mkdir -p $fs/etc/ppp/peers
94 # hide login/pass from regular users
95 chmod go-rwx $fs/etc/ppp/*secrets
96 chmod go-rwx $fs/etc/ppp/options
97 chmod 711 $fs/etc/ppp/scripts/*
98 }