wok-tiny view ppp/receipt @ rev 183

linux: fix bundle.S
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 26 17:09:38 2023 +0000 (13 months ago)
parents a28c45a86936
children
line source
1 # SliTaz package receipt.
3 PACKAGE="ppp"
4 VERSION="2.4.7"
5 CATEGORY="network"
6 GROUP="network"
7 SHORT_DESC="Point to Point Protocol (Internet with RTC modems)"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="BSD GPL"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://ppp.samba.org/"
12 WGET_URL="https://github.com/paulusmack/ppp/archive/$TARBALL"
13 [ -n "$TARGET" ] || TARGET="i486"
14 BUILD_DEPENDS="wget uclibc-cross-compiler-$TARGET"
15 DEPENDS="libdl libgcc_s busybox-net"
16 CONFIG_FILES="/etc/ppp/"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure --prefix=/usr --mandir=/usr/share/man \
22 $CONFIGURE_ARGS &&
23 make CC=uclibc-$TARGET-cc &&
24 make DESTDIR=$DESTDIR/usr install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/etc/ppp/peers $fs/etc/ppp/scripts $fs/usr/sbin
31 cp -a $install/usr/sbin/pppd $fs/usr/sbin
32 cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up
33 cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down
34 cp -a $stuff/* $fs
35 cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts
36 cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts
37 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts
38 cp -a $src/scripts/callback $fs/etc/ppp/scripts
39 cp -a $src/scripts/redialer $fs/etc/ppp/scripts
40 cp -a $src/etc.ppp/* $fs/etc/ppp
41 chmod +x $fs/etc/ppp/ip*
42 # insert #!/bin/sh on top line in ip* scripts
43 sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip*
44 # add empty peers dir
45 sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \
46 $fs/etc/ppp/scripts/ppp-on
48 #sed: taz/ppp-2.4.5/fs/etc/ppp/scripts/ppp-on: Not a directory
51 }
53 config_form()
54 {
55 [ -n "$OPTIONS" ] || OPTIONS="lock"
56 [ -n "$LOCAL_IP" ] || LOCAL_IP="0.0.0.0"
57 [ -n "$REMOTE_IP" ] || REMOTE_IP="0.0.0.0"
58 [ -n "$NETMASK" ] || NETMASK="255.255.255.0"
59 cat <<EOT
60 <pre>
61 $(cat $1/etc/ppp/README.scripts)
62 </pre>
63 <table>
64 <tr>
65 <td>Telephone number</td>
66 <td><input type="text" name="TELEPHONE" value="$TELEPHONE" /></td>
67 </tr>
68 <tr>
69 <td>Account name</td>
70 <td><input type="text" name="ACCOUNT" value="$ACCOUNT" /></td>
71 </tr>
72 <tr>
73 <td>Account password</td>
74 <td><input type="text" name="PASSWORD" value="$PASSWORD" /></td>
75 </tr>
76 <tr>
77 <td>callback password</td>
78 <td><input type="text" name="MODEMPASS" value="$MODEMPASS" /></td>
79 </tr>
80 <tr>
81 <td>Options</td>
82 <td><textarea name="OPTIONS" cols="60" wrap="off">
83 $OPTIONS
84 </textarea></td>
85 </tr>
86 <tr>
87 <td></td><td><pre>$(cat $1/etc/ppp/chap-secrets)</pre></td>
88 </tr>
89 <tr>
90 <td>chap-secrets</td>
91 <td><textarea name="CHAPSECRETS" cols="60" wrap="off">
92 $CHAPSECRETS
93 </textarea></td>
94 </tr>
95 <tr>
96 <td></td><td><pre>$(cat $1/etc/ppp/pap-secrets)</pre></td>
97 </tr>
98 <tr>
99 <td>pap-secrets</td>
100 <td><textarea name="PAPSECRETS" cols="60" wrap="off">
101 $PAPSECRETS
102 </textarea></td>
103 </tr>
104 <tr>
105 <td>Connection script</td>
106 <td><select name="DIALER_SCRIPT">
107 <option value="/etc/ppp/ppp-on-dialer">/etc/ppp/ppp-on-dialer</option>
108 <option value="/etc/ppp/scripts/callback"$([ "$DIALER_SCRIPT" = "/etc/ppp/scripts/callback" ] &&
109 echo ' selected="selected"')>/etc/ppp/scripts/callback</option>
110 </select></td>
111 </tr>
112 <tr>
113 <td>local ip</td>
114 <td><input type="text" name="LOCAL_IP" value="$LOCAL_IP" /></td>
115 </tr>
116 <tr>
117 <td>remote ip</td>
118 <td><input type="text" name="REMOTE_IP" value="$REMOTE_IP" /></td>
119 </tr>
120 <tr>
121 <td>netmask</td>
122 <td><input type="text" name="NETMASK" value="$NETMASK" /></td>
123 </tr>
124 </table>
125 EOT
126 }
128 post_install()
129 {
130 rm -f $1/etc/ppp/README.scripts
131 cat > $1/etc/ppp/options <<EOT
132 $OPTIONS
133 EOT
134 cat >> $1/etc/ppp/pap-secrets <<EOT
135 $PAPSECRETS
136 EOT
137 cat >> $1/etc/ppp/chap-secrets <<EOT
138 $CHAPSECRETS
139 EOT
140 sed -i -e "s/^TELEPHONE=.*/TELEPHONE=\"$TELEPHONE\"/" \
141 -e "s/^ACCOUNT=.*/ACCOUNT=\"$ACCOUNT\"/" \
142 -e "s/^PASSWORD=.*/PASSWORD=\"$PASSWORD\"/" \
143 -e "s/^LOCAL_IP=.*/LOCAL_IP=\"$LOCAL_IP\"/" \
144 -e "s/^REMOTE_IP=.*/REMOTE_IP=\"$REMOTE_IP\"/" \
145 -e "s/^NETMASK=.*/NETMASK=\"$NETMASK\"/" \
146 -e "s/^DIALER_SCRIPT=.*/DIALER_SCRIPT=\"$DIALER_SCRIPT\"/" \
147 $1/etc/ppp/scripts/ppp-on
148 sed -i -e "s/^PHONE=.*/PHONE=\"$TELEPHONE\"/" \
149 -e "s/^PASSWORD=.*/PASSWORD=\"$PASSWORD\"/" \
150 -e "s/^ACCOUNT=.*/ACCOUNT=\"$ACCOUNT\"/" \
151 -e "s/^MODEMPASS=.*/MODEMPASS=\"$MODEMPASS\"/" \
152 $1/etc/ppp/scripts/callback
153 }