wok-tiny view lpd-spooling-config/receipt @ rev 100

Update wiki, add module-serial
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 31 16:32:19 2015 +0100 (2015-10-31)
parents bb00d1e3b0f7
children 0d8ef9102fc0
line source
1 # SliTaz package receipt.
3 PACKAGE="lpd-spooling-config"
4 VERSION="1.0"
5 CATEGORY="meta"
6 SHORT_DESC="Line printer server configuration"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://tiny.slitaz.org/"
10 DEPENDS="base-tiny"
11 SUGGESTED="module-lp module-usblp"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/var/spool $fs/dev $fs/usr/sbin
17 cp $stuff/lpd-helper $fs/usr/sbin
18 }
20 config_form()
21 {
22 cat <<EOT
23 Respective printer names for lp0, lp1 ...
24 <input type="text" name="LP_NAMES" value="$LP_NAMES" >
25 EOT
26 }
28 post_install()
29 {
30 local n
31 grep -q inetd $1/etc/rcS.conf ||
32 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
33 cat >> $1/etc/inetd.conf <<EOT
34 printer stream tcp nowait root lpd lpd /var/spool /usr/sbin/lpd-helper
35 EOT
36 n=0
37 for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
38 mknod $1/dev/lp$n c 6 $n
39 mkdir $1/var/spool/$i
40 n=$(($n + 1))
41 done
42 }