wok view ppp/receipt @ rev 19229
Add httpfs2-fuse
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 24 16:28:42 2016 +0200 (2016-06-24) |
parents | 96a79b0c83ee |
children | e85c838301ad |
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 case "$ARCH" in
22 arm*)
23 export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH
24 esac
25 ./configure --prefix=/usr \
26 $CONFIGURE_ARGS &&
27 make &&
28 make DESTDIR=$DESTDIR/usr install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
35 cp -a $install/usr/sbin $fs/usr
36 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
37 cp -a $stuff/pppnc-server $fs/usr/sbin
38 ln $fs/usr/sbin/pppnc-server $fs/usr/sbin/pppnc-client
39 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
40 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
41 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
43 # Config files.
44 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
45 cp $stuff/README.scripts $fs/etc/ppp
46 cp -a $src/etc.ppp/* $fs/etc/ppp
48 # PPP scripts.
49 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
50 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
51 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
52 $fs/etc/ppp/scripts/ppp-on
54 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
55 cp -a $src/scripts/callback $fs/etc/ppp/scripts
56 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
57 cat >> $fs/etc/ppp/ip-up <<EOT
58 #!/bin/sh
60 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
61 . /etc/ppp/ip-up.d/\$6 "\$@"
62 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
63 rm -f /etc/ppp/resolv.prev
64 if [ -f /etc/resolv.conf ]; then
65 cp /etc/resolv.conf /etc/ppp/resolv.prev
66 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
67 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
68 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
69 chmod 644 /etc/resolv.conf
70 else
71 cp /etc/ppp/resolv.conf /etc
72 chmod 644 /etc/resolv.conf
73 fi
74 fi
75 EOT
76 cat >> $fs/etc/ppp/ip-down <<EOT
77 #!/bin/sh
79 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
80 . /etc/ppp/ip-down.d/\$6 "\$@"
81 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
82 if [ -f /etc/ppp/resolv.prev ]; then
83 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
84 chmod 644 /etc/resolv.conf
85 else
86 rm -f /etc/resolv.conf
87 fi
88 fi
89 EOT
90 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
91 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
92 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
94 # insert #!/bin/sh on top line in ip* scripts
95 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
96 # add empty peers dir
97 mkdir -p $fs/etc/ppp/peers
98 # hide login/pass from regular users
99 chmod go-rwx $fs/etc/ppp/*secrets
100 chmod go-rwx $fs/etc/ppp/options
101 chmod 711 $fs/etc/ppp/scripts/*
102 }