wok view ppp/receipt @ rev 24503

updated dulwich (0.19.14 -> 0.19.16)
author Hans-G?nter Theisgen
date Sun Feb 20 10:36:29 2022 +0100 (2022-02-20)
parents 5ea0ce1cecc0
children 0262035dc1e7
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"
13 SECRET_FILES="/etc/ppp/*secrets"
14 HOST_ARCH="i486 arm"
16 BUILD_DEPENDS="wget"
17 SUGGESTED="tazpanel"
19 current_version()
20 {
21 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 case "$ARCH" in
29 arm*)
30 export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH
31 esac
32 ./configure --prefix=/usr \
33 $CONFIGURE_ARGS &&
34 make &&
35 make DESTDIR=$DESTDIR/usr install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/share/applications \
42 $fs/var/www/tazpanel/menu.d/network/VPN
43 cp -a $install/usr/sbin $fs/usr
44 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
45 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
46 cp $stuff/*.desktop $fs/usr/share/applications
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 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
66 . /etc/ppp/ip-up.d/\$6 "\$@"
67 elif [ -n "\$DNS1\$DNS2" ]; then
68 rm -f /etc/ppp/resolv.prev
69 [ -s /etc/resolv.conf ] && mv -f /etc/resolv.conf /etc/ppp/resolv.prev
70 [ -n "\$DNS1" ] && echo "nameserver \$DNS1" >> /etc/resolv.conf
71 [ -n "\$DNS2" ] && echo "nameserver \$DNS2" >> /etc/resolv.conf
72 chmod 644 /etc/resolv.conf
73 fi
74 EOT
75 cat >> $fs/etc/ppp/ip-down <<EOT
76 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
77 . /etc/ppp/ip-down.d/\$6 "\$@"
78 elif [ -n "\$DNS1\$DNS2" ]; then
79 rm -f /etc/resolv.conf
80 mv -f /etc/ppp/resolv.prev /etc/resolv.conf
81 fi
82 EOT
83 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
84 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
85 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
87 # insert #!/bin/sh on top line in ip* scripts
88 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
89 # add empty peers dir
90 mkdir -p $fs/etc/ppp/peers
91 # hide login/pass from regular users
92 chmod go-rwx $fs/etc/ppp/*secrets
93 chmod go-rwx $fs/etc/ppp/options
94 chmod 711 $fs/etc/ppp/scripts/*
95 }
97 post_install()
98 {
99 rm -f $1/var/cache/tazpanel/header.* 2>/dev/null || true
100 chroot "$1/" chgrp dialout /usr/sbin/pppd
101 chmod 4750 $1/usr/sbin/pppd
102 echo
103 echo " ADD yourself to group dialout to use pppd: addgroup tux dialout"
104 }