wok-next view ppp/receipt @ rev 20286
remove ppp-dev, ppp-pam
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 08 15:57:06 2017 +0100 (2017-11-08) |
parents | 3a6b97ad0a64 |
children | d3adbeea3a9f |
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="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"
16 BUILD_DEPENDS="pam-dev"
17 SPLIT="ppp ppp-pam ppp-dev"
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 cp -a $src $src-pam
28 ./configure $CONFIGURE_ARGS &&
29 make &&
30 make DESTDIR=$DESTDIR/usr install
32 cd $src-pam
33 sed -i 's/#USE_PAM/USE_PAM/' pppd/Makefile.linux
34 ./configure $CONFIGURE_ARGS &&
35 make &&
36 make DESTDIR=$DESTDIR-pam/usr install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 case $PACKAGE in
43 ppp|ppp-pam)
44 [ $PACKAGE == ppp-pam ] && DEPENDS="pam" && PROVIDE="ppp:pam" &&
45 CAT="network|with PAM support" && install=$install-pam
46 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
47 cp -a $install/usr/sbin $fs/usr
48 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
49 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
50 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
51 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
53 # Config files.
54 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
55 cp $stuff/README.scripts $fs/etc/ppp
56 cp -a $src/etc.ppp/* $fs/etc/ppp
58 # PPP scripts.
59 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
60 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
61 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
62 $fs/etc/ppp/scripts/ppp-on
64 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
65 cp -a $src/scripts/callback $fs/etc/ppp/scripts
66 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
67 cat >> $fs/etc/ppp/ip-up <<EOT
68 #!/bin/sh
70 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
71 . /etc/ppp/ip-up.d/\$6 "\$@"
72 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
73 rm -f /etc/ppp/resolv.prev
74 if [ -f /etc/resolv.conf ]; then
75 cp /etc/resolv.conf /etc/ppp/resolv.prev
76 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
77 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
78 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
79 chmod 644 /etc/resolv.conf
80 else
81 cp /etc/ppp/resolv.conf /etc
82 chmod 644 /etc/resolv.conf
83 fi
84 fi
85 EOT
86 cat >> $fs/etc/ppp/ip-down <<EOT
87 #!/bin/sh
89 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
90 . /etc/ppp/ip-down.d/\$6 "\$@"
91 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
92 if [ -f /etc/ppp/resolv.prev ]; then
93 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
94 chmod 644 /etc/resolv.conf
95 else
96 rm -f /etc/resolv.conf
97 fi
98 fi
99 EOT
100 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
101 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
102 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
104 # insert #!/bin/sh on top line in ip* scripts
105 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
106 # add empty peers dir
107 mkdir -p $fs/etc/ppp/peers
108 # hide login/pass from regular users
109 chmod go-rwx $fs/etc/ppp/*secrets
110 chmod go-rwx $fs/etc/ppp/options
111 chmod 711 $fs/etc/ppp/scripts/*
112 ;;
113 ppp-dev)
114 CAT="development|development files"
115 copy include/
116 ;;
117 esac
118 }