wok-next view ppp/receipt @ rev 21191
Add firefox-official-en-GB
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Sep 24 10:03:55 2019 +0300 (2019-09-24) |
parents | a3c581bf52b8 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ppp"
4 VERSION="2.4.7"
5 CATEGORY="network"
6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="BSD GPL"
9 WEB_SITE="https://ppp.samba.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$GITHUB/paulusmack/ppp/tarball/ppp-$VERSION"
14 BUILD_DEPENDS="pam-dev"
15 SPLIT="$PACKAGE-pam $PACKAGE-dev"
17 compile_rules() {
18 cp -a $src $src-pam
19 ./configure $CONFIGURE_ARGS &&
20 make &&
21 make DESTDIR=$install/usr install || return 1
23 cd $src-pam
24 sed -i 's/#USE_PAM/USE_PAM/' pppd/Makefile.linux
25 ./configure $CONFIGURE_ARGS &&
26 make &&
27 make DESTDIR=$install-pam/usr install
28 }
30 genpkg_rules() {
31 case $PACKAGE in
32 ppp|ppp-pam)
33 if [ $PACKAGE == 'ppp-pam' ]; then
34 DEPENDS="pam"
35 PROVIDE="ppp:pam"
36 CAT="network|with PAM support"
37 install=$install-pam
38 fi
39 SUGGESTED="tazpanel"
40 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets"
41 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
42 cp -a $install/usr/sbin $fs/usr
43 chgrp dialout $fs/usr/sbin/pppd
44 chmod 4750 $fs/usr/sbin/pppd
45 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
46 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
47 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
48 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
50 # Config files.
51 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
52 cp $stuff/README.scripts $fs/etc/ppp
53 cp -a $src/etc.ppp/* $fs/etc/ppp
55 # PPP scripts.
56 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
57 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
58 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
59 $fs/etc/ppp/scripts/ppp-on
61 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
62 cp -a $src/scripts/callback $fs/etc/ppp/scripts
63 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
64 cat >> $fs/etc/ppp/ip-up <<EOT
65 #!/bin/sh
67 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
68 . /etc/ppp/ip-up.d/\$6 "\$@"
69 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
70 rm -f /etc/ppp/resolv.prev
71 if [ -f /etc/resolv.conf ]; then
72 cp /etc/resolv.conf /etc/ppp/resolv.prev
73 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
74 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
75 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
76 chmod 644 /etc/resolv.conf
77 else
78 cp /etc/ppp/resolv.conf /etc
79 chmod 644 /etc/resolv.conf
80 fi
81 fi
82 EOT
83 cat >> $fs/etc/ppp/ip-down <<EOT
84 #!/bin/sh
86 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
87 . /etc/ppp/ip-down.d/\$6 "\$@"
88 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
89 if [ -f /etc/ppp/resolv.prev ]; then
90 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
91 chmod 644 /etc/resolv.conf
92 else
93 rm -f /etc/resolv.conf
94 fi
95 fi
96 EOT
97 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
98 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
99 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
101 # insert #!/bin/sh on top line in ip* scripts
102 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
103 # add empty peers dir
104 mkdir -p $fs/etc/ppp/peers
105 # hide login/pass from regular users
106 chmod go-rwx $fs/etc/ppp/*secrets
107 chmod go-rwx $fs/etc/ppp/options
108 chmod 711 $fs/etc/ppp/scripts/*
109 ;;
110 ppp-dev)
111 copy include/
112 ;;
113 esac
114 }