wok annotate ppp/receipt @ rev 25639
Add miss pixmaps for xarchiver, thanks kubepc
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sat Jan 06 09:40:30 2024 +0100 (8 months ago) |
parents | ac8ca9758df1 |
children |
rev | line source |
---|---|
pankso@6 | 1 # SliTaz package receipt. |
pankso@6 | 2 |
pankso@6 | 3 PACKAGE="ppp" |
pascal@18019 | 4 VERSION="2.4.7" |
pankso@203 | 5 CATEGORY="network" |
pankso@6 | 6 SHORT_DESC="Implements the Point-to-Point Protocol (PPP)." |
pankso@6 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@14698 | 8 LICENSE="BSD GPL" |
pankso@6 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20669 | 10 WEB_SITE="https://ppp.samba.org/" |
pascal@18019 | 11 WGET_URL="https://github.com/paulusmack/ppp/archive/$TARBALL" |
pascal@23902 | 12 CONFIG_FILES="/etc/ppp/options" |
pascal@23902 | 13 SECRET_FILES="/etc/ppp/*secrets" |
pankso@16194 | 14 HOST_ARCH="i486 arm" |
pankso@6 | 15 |
pascal@18043 | 16 BUILD_DEPENDS="wget" |
pascal@18017 | 17 SUGGESTED="tazpanel" |
pascal@18017 | 18 |
pascal@25601 | 19 # What is the latest version available today? |
pascal@24055 | 20 current_version() |
pascal@24055 | 21 { |
pascal@24299 | 22 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \ |
pascal@25601 | 23 sed '/tag\//!d;s|.*tag/[a-z-]*||;s|".*||;q' |
pascal@24055 | 24 } |
pascal@24055 | 25 |
pankso@6 | 26 # Rules to configure and make the package. |
pankso@6 | 27 compile_rules() |
pankso@6 | 28 { |
pascal@19089 | 29 case "$ARCH" in |
pascal@19089 | 30 arm*) |
pascal@19089 | 31 export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH |
pascal@19089 | 32 esac |
pankso@16194 | 33 ./configure --prefix=/usr \ |
pascal@18019 | 34 $CONFIGURE_ARGS && |
pascal@1634 | 35 make && |
pascal@11797 | 36 make DESTDIR=$DESTDIR/usr install |
pankso@6 | 37 } |
pankso@6 | 38 |
pankso@6 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 40 genpkg_rules() |
pankso@6 | 41 { |
pascal@22849 | 42 mkdir -p $fs/usr/share/applications \ |
pascal@22849 | 43 $fs/var/www/tazpanel/menu.d/network/VPN |
pascal@15603 | 44 cp -a $install/usr/sbin $fs/usr |
pankso@16194 | 45 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr |
pascal@18017 | 46 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel |
pascal@22849 | 47 cp $stuff/*.desktop $fs/usr/share/applications |
pascal@18017 | 48 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp |
pascal@18025 | 49 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp |
pascal@18017 | 50 |
pankso@6 | 51 # Config files. |
pascal@15885 | 52 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d |
slaxemulator@9475 | 53 cp $stuff/README.scripts $fs/etc/ppp |
pankso@6 | 54 cp -a $src/etc.ppp/* $fs/etc/ppp |
domcox@12173 | 55 |
pankso@6 | 56 # PPP scripts. |
pankso@6 | 57 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts |
pankso@6 | 58 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts |
pankso@16194 | 59 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ |
pankso@16194 | 60 $fs/etc/ppp/scripts/ppp-on |
jozee@5104 | 61 |
pankso@6 | 62 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts |
pankso@6 | 63 cp -a $src/scripts/callback $fs/etc/ppp/scripts |
pankso@6 | 64 cp -a $src/scripts/redialer $fs/etc/ppp/scripts |
trixar_za@12286 | 65 cat >> $fs/etc/ppp/ip-up <<EOT |
pascal@15885 | 66 if [ -x /etc/ppp/ip-up.d/\$6 ]; then |
pascal@15885 | 67 . /etc/ppp/ip-up.d/\$6 "\$@" |
pascal@22849 | 68 elif [ -n "\$DNS1\$DNS2" ]; then |
trixar_za@12286 | 69 rm -f /etc/ppp/resolv.prev |
pascal@22849 | 70 [ -s /etc/resolv.conf ] && mv -f /etc/resolv.conf /etc/ppp/resolv.prev |
pascal@22849 | 71 [ -n "\$DNS1" ] && echo "nameserver \$DNS1" >> /etc/resolv.conf |
pascal@22849 | 72 [ -n "\$DNS2" ] && echo "nameserver \$DNS2" >> /etc/resolv.conf |
pascal@22849 | 73 chmod 644 /etc/resolv.conf |
trixar_za@12286 | 74 fi |
trixar_za@12286 | 75 EOT |
trixar_za@12286 | 76 cat >> $fs/etc/ppp/ip-down <<EOT |
pascal@15885 | 77 if [ -x /etc/ppp/ip-down.d/\$6 ]; then |
pascal@15885 | 78 . /etc/ppp/ip-down.d/\$6 "\$@" |
pascal@22849 | 79 elif [ -n "\$DNS1\$DNS2" ]; then |
pascal@22849 | 80 rm -f /etc/resolv.conf |
pascal@22849 | 81 mv -f /etc/ppp/resolv.prev /etc/resolv.conf |
trixar_za@12286 | 82 fi |
trixar_za@12286 | 83 EOT |
trixar_za@12286 | 84 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up |
trixar_za@12286 | 85 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down |
pascal@15885 | 86 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down |
domcox@12173 | 87 |
jozee@5092 | 88 # insert #!/bin/sh on top line in ip* scripts |
pankso@16194 | 89 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null |
jozee@5104 | 90 # add empty peers dir |
jozee@5104 | 91 mkdir -p $fs/etc/ppp/peers |
domcox@12174 | 92 # hide login/pass from regular users |
domcox@12174 | 93 chmod go-rwx $fs/etc/ppp/*secrets |
domcox@12174 | 94 chmod go-rwx $fs/etc/ppp/options |
domcox@12174 | 95 chmod 711 $fs/etc/ppp/scripts/* |
pascal@15886 | 96 } |
pascal@20155 | 97 |
pascal@20155 | 98 post_install() |
pascal@20155 | 99 { |
pascal@20155 | 100 rm -f $1/var/cache/tazpanel/header.* 2>/dev/null || true |
pascal@20305 | 101 chroot "$1/" chgrp dialout /usr/sbin/pppd |
pascal@20305 | 102 chmod 4750 $1/usr/sbin/pppd |
pascal@20319 | 103 echo |
pascal@20305 | 104 echo " ADD yourself to group dialout to use pppd: addgroup tux dialout" |
pascal@20155 | 105 } |