wok diff mgetty/receipt @ rev 1337

Add mgetty
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 31 12:13:06 2008 +0000 (2008-08-31)
parents
children bd6010223726
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mgetty/receipt	Sun Aug 31 12:13:06 2008 +0000
     1.3 @@ -0,0 +1,77 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="mgetty"
     1.7 +VERSION="1.1.35"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="reliable and proven fax send and receive solution."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="$PACKAGE$VERSION-Feb22.tar.gz"
    1.12 +WEB_SITE="http://mgetty.greenie.net/"
    1.13 +WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/1.1/$TARBALL"
    1.14 +CONFIG_FILES="/etc/mgetty+sendfax"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +
    1.20 +	cd $src
    1.21 +	[ -f Makefile.dist ] && mv -f Makefile.dist Makefile
    1.22 +	cp Makefile Makefile.dist
    1.23 +	cp Makefile Makefile.install
    1.24 +	cp policy.h-dist policy.h
    1.25 +	sed -i  -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
    1.26 +	sed -i  -e "s|^prefix=/usr/local|prefix=/usr|" \
    1.27 +		-e "s|^spool=/var/spool|spool=/var/spool|" \
    1.28 +		-e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
    1.29 +		Makefile
    1.30 +	sed -i  -e "s|^prefix=/usr/local|prefix=$PWD/_pkg/usr|" \
    1.31 +		-e "s|^spool=/var/spool|spool=$PWD/_pkg/var/spool|" \
    1.32 +		-e "s|^CONFDIR=.*|CONFDIR=$PWD/_pkg/etc/mgetty+sendfax|" \
    1.33 +		-e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
    1.34 +		Makefile.install
    1.35 +	make bin-all vgetty
    1.36 +	mkdir -p _pkg/var/spool
    1.37 +	mv -f Makefile.install Makefile
    1.38 +	make -k install.bin vgetty-install || true
    1.39 +}
    1.40 +
    1.41 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.42 +genpkg_rules()
    1.43 +{
    1.44 +	mkdir -p $fs/usr
    1.45 +	cp -a $_pkg/usr/lib $fs/usr
    1.46 +	cp -a $_pkg/usr/sbin $fs/usr
    1.47 +	cp -a $_pkg/etc $fs
    1.48 +	cp -a $_pkg/var $fs
    1.49 +	chmod 755 $fs/var/spool/fax
    1.50 +	for i in $(cd $WOK; ls -d mgetty-*)
    1.51 +	do
    1.52 +		tazwok cook $i
    1.53 +	done
    1.54 +}
    1.55 +
    1.56 +# Pre and post install commands for Tazpkg.
    1.57 +post_install()
    1.58 +{
    1.59 +	( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
    1.60 +		$1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
    1.61 +$(cd $1/ ; find etc/mgetty+sendfax -type f)
    1.62 +EOT
    1.63 +        # adduser fax if needed
    1.64 +	if ! grep -q fax $1/etc/passwd; then
    1.65 +		echo -n "Adding user fax..."
    1.66 +		chroot $1/ adduser fax -D -H -S
    1.67 +		status
    1.68 +	fi
    1.69 +	chown fax $fs/var/spool/fax
    1.70 +}
    1.71 +
    1.72 +post_remove()
    1.73 +{
    1.74 +	deluser fax
    1.75 +}
    1.76 +
    1.77 +repack_cleanup()
    1.78 +{
    1.79 +        zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
    1.80 +}