wok-next view ppp/receipt @ rev 19751

Up perl-xml-parser: we have perl-dev now...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jun 08 15:34:29 2017 +0300 (2017-06-08)
parents 50aef5b483cb
children 9d04ac35b45f
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 WEB_SITE="http://ppp.samba.org/"
10 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets"
11 HOST_ARCH="i486 arm"
12 SUGGESTED="tazpanel"
14 TARBALL="$PACKAGE-$VERSION.tar.gz"
15 WGET_URL="$GITHUB/paulusmack/ppp/tarball/ppp-$VERSION"
17 SIBLINGS="ppp-pam"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 case "$ARCH" in
23 arm*)
24 export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH
25 esac
27 ./configure $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$DESTDIR/usr install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
36 cp -a $install/usr/sbin $fs/usr
37 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
38 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
39 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
40 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
42 # Config files.
43 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
44 cp $stuff/README.scripts $fs/etc/ppp
45 cp -a $src/etc.ppp/* $fs/etc/ppp
47 # PPP scripts.
48 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
49 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
50 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
51 $fs/etc/ppp/scripts/ppp-on
53 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
54 cp -a $src/scripts/callback $fs/etc/ppp/scripts
55 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
56 cat >> $fs/etc/ppp/ip-up <<EOT
57 #!/bin/sh
59 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
60 . /etc/ppp/ip-up.d/\$6 "\$@"
61 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
62 rm -f /etc/ppp/resolv.prev
63 if [ -f /etc/resolv.conf ]; then
64 cp /etc/resolv.conf /etc/ppp/resolv.prev
65 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
66 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
67 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
68 chmod 644 /etc/resolv.conf
69 else
70 cp /etc/ppp/resolv.conf /etc
71 chmod 644 /etc/resolv.conf
72 fi
73 fi
74 EOT
75 cat >> $fs/etc/ppp/ip-down <<EOT
76 #!/bin/sh
78 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
79 . /etc/ppp/ip-down.d/\$6 "\$@"
80 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
81 if [ -f /etc/ppp/resolv.prev ]; then
82 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
83 chmod 644 /etc/resolv.conf
84 else
85 rm -f /etc/resolv.conf
86 fi
87 fi
88 EOT
89 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
90 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
91 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
93 # insert #!/bin/sh on top line in ip* scripts
94 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
95 # add empty peers dir
96 mkdir -p $fs/etc/ppp/peers
97 # hide login/pass from regular users
98 chmod go-rwx $fs/etc/ppp/*secrets
99 chmod go-rwx $fs/etc/ppp/options
100 chmod 711 $fs/etc/ppp/scripts/*
101 }