wok-next view ppp/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | d3adbeea3a9f |
children | f4db0f796bc3 |
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/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$GITHUB/paulusmack/ppp/tarball/ppp-$VERSION"
14 BUILD_DEPENDS="pam-dev"
15 SPLIT="ppp ppp-pam ppp-dev"
17 compile_rules() {
18 case "$ARCH" in
19 arm*) export PATH=/cross/arm/tools/arm-slitaz-linux-gnueabi/bin:$PATH;;
20 esac
22 cp -a $src $src-pam
23 ./configure $CONFIGURE_ARGS &&
24 make &&
25 make DESTDIR=$DESTDIR/usr install || return 1
27 cd $src-pam
28 sed -i 's/#USE_PAM/USE_PAM/' pppd/Makefile.linux
29 ./configure $CONFIGURE_ARGS &&
30 make &&
31 make DESTDIR=$DESTDIR-pam/usr install
32 }
34 genpkg_rules() {
35 case $PACKAGE in
36 ppp|ppp-pam)
37 if [ $PACKAGE == 'ppp-pam' ]; then
38 DEPENDS="pam"
39 PROVIDE="ppp:pam"
40 CAT="network|with PAM support"
41 install=$install-pam
42 fi
43 SUGGESTED="tazpanel"
44 CONFIG_FILES="/etc/ppp/options /etc/ppp/*secrets"
45 mkdir -p $fs/usr $fs/var/www/tazpanel/menu.d/network/VPN
46 cp -a $install/usr/sbin $fs/usr
47 [ -d "$install/usr/lib" ] && cp -a $install/usr/lib $fs/usr
48 cp -a $stuff/ppp.cgi $fs/var/www/tazpanel
49 ln -s ../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/ppp
50 ln -s ../../../ppp.cgi $fs/var/www/tazpanel/menu.d/network/VPN/ppp
52 # Config files.
53 mkdir -p $fs/etc/ppp/scripts $fs/etc/ppp/ip-up.d $fs/etc/ppp/ip-down.d
54 cp $stuff/README.scripts $fs/etc/ppp
55 cp -a $src/etc.ppp/* $fs/etc/ppp
57 # PPP scripts.
58 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
59 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
60 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
61 $fs/etc/ppp/scripts/ppp-on
63 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
64 cp -a $src/scripts/callback $fs/etc/ppp/scripts
65 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
66 cat >> $fs/etc/ppp/ip-up <<EOT
67 #!/bin/sh
69 if [ -x /etc/ppp/ip-up.d/\$6 ]; then
70 . /etc/ppp/ip-up.d/\$6 "\$@"
71 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
72 rm -f /etc/ppp/resolv.prev
73 if [ -f /etc/resolv.conf ]; then
74 cp /etc/resolv.conf /etc/ppp/resolv.prev
75 grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
76 grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
77 cat /etc/ppp/resolv.conf >> /etc/resolv.conf
78 chmod 644 /etc/resolv.conf
79 else
80 cp /etc/ppp/resolv.conf /etc
81 chmod 644 /etc/resolv.conf
82 fi
83 fi
84 EOT
85 cat >> $fs/etc/ppp/ip-down <<EOT
86 #!/bin/sh
88 if [ -x /etc/ppp/ip-down.d/\$6 ]; then
89 . /etc/ppp/ip-down.d/\$6 "\$@"
90 elif [ -n "\$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
91 if [ -f /etc/ppp/resolv.prev ]; then
92 cp -f /etc/ppp/resolv.prev /etc/resolv.conf
93 chmod 644 /etc/resolv.conf
94 else
95 rm -f /etc/resolv.conf
96 fi
97 fi
98 EOT
99 # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
100 # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
101 chmod 711 $fs/etc/ppp/ip-up $fs/etc/ppp/ip-down
103 # insert #!/bin/sh on top line in ip* scripts
104 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2>/dev/null
105 # add empty peers dir
106 mkdir -p $fs/etc/ppp/peers
107 # hide login/pass from regular users
108 chmod go-rwx $fs/etc/ppp/*secrets
109 chmod go-rwx $fs/etc/ppp/options
110 chmod 711 $fs/etc/ppp/scripts/*
111 ;;
112 ppp-dev)
113 copy include/
114 ;;
115 esac
116 }