wok-next diff ppp/receipt @ rev 20564
shell-detector, screenfetch: create $install tree
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Apr 10 10:14:26 2018 +0200 (2018-04-10) |
parents | d3adbeea3a9f |
children | f4db0f796bc3 |
line diff
1.1 --- a/ppp/receipt Wed Nov 08 19:39:57 2017 +0200 1.2 +++ b/ppp/receipt Tue Apr 10 10:14:26 2018 +0200 1.3 @@ -7,21 +7,16 @@ 1.4 MAINTAINER="pankso@slitaz.org" 1.5 LICENSE="BSD GPL" 1.6 WEB_SITE="http://ppp.samba.org/" 1.7 -CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets" 1.8 -HOST_ARCH="i486 arm" 1.9 -SUGGESTED="tazpanel" 1.10 1.11 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 WGET_URL="$GITHUB/paulusmack/ppp/tarball/ppp-$VERSION" 1.13 + 1.14 BUILD_DEPENDS="pam-dev" 1.15 SPLIT="ppp ppp-pam ppp-dev" 1.16 1.17 -# Rules to configure and make the package. 1.18 -compile_rules() 1.19 -{ 1.20 +compile_rules() { 1.21 case "$ARCH" in 1.22 - arm*) 1.23 - export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH 1.24 + arm*) export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH;; 1.25 esac 1.26 1.27 cp -a $src $src-pam 1.28 @@ -36,39 +31,39 @@ 1.29 make DESTDIR=$DESTDIR-pam/usr install 1.30 } 1.31 1.32 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.33 -genpkg_rules() 1.34 -{ 1.35 +genpkg_rules() { 1.36 case $PACKAGE in 1.37 - ppp|ppp-pam) 1.38 - if [ $PACKAGE == 'ppp-pam' ]; then 1.39 - DEPENDS="pam" 1.40 - PROVIDE="ppp:pam" 1.41 - CAT="network|with PAM support" 1.42 - install=$install-pam 1.43 - fi 1.44 - mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN 1.45 - cp -a $install/usr/sbin $fs/usr 1.46 - [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr 1.47 - cp -a $stuff/ppp.cgi $fs/var/www/tazpanel 1.48 - ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp 1.49 - ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp 1.50 + ppp|ppp-pam) 1.51 + if [ $PACKAGE == 'ppp-pam' ]; then 1.52 + DEPENDS="pam" 1.53 + PROVIDE="ppp:pam" 1.54 + CAT="network|with PAM support" 1.55 + install=$install-pam 1.56 + fi 1.57 + SUGGESTED="tazpanel" 1.58 + CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets" 1.59 + mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN 1.60 + cp -a $install/usr/sbin $fs/usr 1.61 + [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr 1.62 + cp -a $stuff/ppp.cgi $fs/var/www/tazpanel 1.63 + ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp 1.64 + ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp 1.65 1.66 - # Config files. 1.67 - mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d 1.68 - cp $stuff/README.scripts $fs/etc/ppp 1.69 - cp -a $src/etc.ppp/* $fs/etc/ppp 1.70 + # Config files. 1.71 + mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d 1.72 + cp $stuff/README.scripts $fs/etc/ppp 1.73 + cp -a $src/etc.ppp/* $fs/etc/ppp 1.74 1.75 - # PPP scripts. 1.76 - cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts 1.77 - cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts 1.78 - sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ 1.79 - $fs/etc/ppp/scripts/ppp-on 1.80 + # PPP scripts. 1.81 + cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts 1.82 + cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts 1.83 + sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ 1.84 + $fs/etc/ppp/scripts/ppp-on 1.85 1.86 - cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts 1.87 - cp -a $src/scripts/callback $fs/etc/ppp/scripts 1.88 - cp -a $src/scripts/redialer $fs/etc/ppp/scripts 1.89 - cat >> $fs/etc/ppp/ip-up <<EOT 1.90 + cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts 1.91 + cp -a $src/scripts/callback $fs/etc/ppp/scripts 1.92 + cp -a $src/scripts/redialer $fs/etc/ppp/scripts 1.93 + cat >> $fs/etc/ppp/ip-up <<EOT 1.94 #!/bin/sh 1.95 1.96 if [ -x /etc/ppp/ip-up.d/\$6 ]; then 1.97 @@ -87,7 +82,7 @@ 1.98 fi 1.99 fi 1.100 EOT 1.101 - cat >> $fs/etc/ppp/ip-down <<EOT 1.102 + cat >> $fs/etc/ppp/ip-down <<EOT 1.103 #!/bin/sh 1.104 1.105 if [ -x /etc/ppp/ip-down.d/\$6 ]; then 1.106 @@ -101,21 +96,21 @@ 1.107 fi 1.108 fi 1.109 EOT 1.110 - # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up 1.111 - # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down 1.112 - chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down 1.113 + # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up 1.114 + # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down 1.115 + chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down 1.116 1.117 - # insert #!/bin/sh on top line in ip* scripts 1.118 - sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null 1.119 - # add empty peers dir 1.120 - mkdir -p $fs/etc/ppp/peers 1.121 - # hide login/pass from regular users 1.122 - chmod go-rwx $fs/etc/ppp/*secrets 1.123 - chmod go-rwx $fs/etc/ppp/options 1.124 - chmod 711 $fs/etc/ppp/scripts/* 1.125 - ;; 1.126 - ppp-dev) 1.127 - copy include/ 1.128 - ;; 1.129 + # insert #!/bin/sh on top line in ip* scripts 1.130 + sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null 1.131 + # add empty peers dir 1.132 + mkdir -p $fs/etc/ppp/peers 1.133 + # hide login/pass from regular users 1.134 + chmod go-rwx $fs/etc/ppp/*secrets 1.135 + chmod go-rwx $fs/etc/ppp/options 1.136 + chmod 711 $fs/etc/ppp/scripts/* 1.137 + ;; 1.138 + ppp-dev) 1.139 + copy include/ 1.140 + ;; 1.141 esac 1.142 }