# SliTaz package receipt. PACKED_SIZE="16.0K" UNPACKED_SIZE="48.0K" PACKAGE="p910nd" VERSION="0.93" CATEGORY="network" SHORT_DESC="Forward printer device to 9100+ ports" MAINTAINER="pascal.bellard@slitaz.org" TARBALL="$PACKAGE-$VERSION.tar.bz2" WEB_SITE="http://p910nd.sourceforge.net/" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" DEPENDS="base-tiny" CONFIG_FILES="/etc/inetd.conf /etc/rcS.conf" # Rules to configure and make the package. compile_rules() { cd $src make CC=uclibc-i486-cc CFLAGS=-DLOCKFILE_DIR=\\\"/var/lock\\\" && make DESTDIR=$PWD/_pkg install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr $fs/etc/init.d $fs/dev cp -a $_pkg/usr/sbin $fs/usr mknod -m 660 $fs/dev/lp0 c 6 0 ln -s daemon $fs/etc/init.d/p910nd } post_install() { [ -n "$DEVICES" ] || DEVICES="/dev/lp0" grep -q inetd $1/etc/rcS.conf || sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf grep -q p910nd $1/etc/rcS.conf || sed -i 's/^RUN_DAEMONS="/&p910nd /' $1/etc/rcS.conf grep -q p910nd $1/etc/inetd.conf || echo "$DEVICES" | dos2unix | awk '{ if ($1 != "") printf \ "%d stream tcp nowait root %s %s -b -f %s\n", 9100 + n++, \ "/usr/sbin/p910nd", "/usr/sbin/p910nd", $1 }' >> $1/etc/inetd.conf } config_form() { [ -n "$DEVICES" ] || DEVICES=/dev/lp0 grep -q p910nd $1/etc/inetd.conf && return 1 cat < $DEVICES EOT }