wok-6.x view ppp/receipt @ rev 23892

Fix coturn & grub4dos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jul 25 17:02:18 2020 +0000 (2020-07-25)
parents 1035f0e819bc
children a8546de77bcc
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="https://ppp.samba.org/"
11 WGET_URL="https://github.com/paulusmack/ppp/archive/$TARBALL"
12 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets"
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/share/applications \
35 $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 cp $stuff/*.desktop $fs/usr/share/applications
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 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
59 . /etc/ppp/ip-up.d/\$6 "\$@"
60 elif [ -n "\$DNS1\$DNS2" ]; then
61 rm -f /etc/ppp/resolv.prev
62 [ -s /etc/resolv.conf ] && mv -f /etc/resolv.conf /etc/ppp/resolv.prev
63 [ -n "\$DNS1" ] && echo "nameserver \$DNS1" >> /etc/resolv.conf
64 [ -n "\$DNS2" ] && echo "nameserver \$DNS2" >> /etc/resolv.conf
65 chmod 644 /etc/resolv.conf
66 fi
67 EOT
68 cat >> $fs/etc/ppp/ip-down <<EOT
69 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
70 . /etc/ppp/ip-down.d/\$6 "\$@"
71 elif [ -n "\$DNS1\$DNS2" ]; then
72 rm -f /etc/resolv.conf
73 mv -f /etc/ppp/resolv.prev /etc/resolv.conf
74 fi
75 EOT
76 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
77 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
78 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
80 # insert #!/bin/sh on top line in ip* scripts
81 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
82 # add empty peers dir
83 mkdir -p $fs/etc/ppp/peers
84 # hide login/pass from regular users
85 chmod go-rwx $fs/etc/ppp/*secrets
86 chmod go-rwx $fs/etc/ppp/options
87 chmod 711 $fs/etc/ppp/scripts/*
88 }
90 post_install()
91 {
92 rm -f $1/var/cache/tazpanel/header.* 2>/dev/null || true
93 chroot "$1/" chgrp dialout /usr/sbin/pppd
94 chmod 4750 $1/usr/sbin/pppd
95 echo
96 echo " ADD yourself to group dialout to use pppd: addgroup tux dialout"
97 }