wok-current rev 1337
Add mgetty
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 31 12:13:06 2008 +0000 (2008-08-31) |
parents | 200afcc9e5f4 |
children | fbccc97d8c2f |
files | mgetty-voicetools/receipt mgetty/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mgetty-voicetools/receipt Sun Aug 31 12:13:06 2008 +0000 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="mgetty-voicetools" 1.7 +VERSION="1.1.35" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Convertion tool set for vgetty." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://mgetty.greenie.net/" 1.12 +DEPENDS="mgetty" 1.13 +WANTED="mgetty" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr 1.19 + cp -a $_pkg/usr/bin $fs/usr 1.20 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/mgetty/receipt Sun Aug 31 12:13:06 2008 +0000 2.3 @@ -0,0 +1,77 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="mgetty" 2.7 +VERSION="1.1.35" 2.8 +CATEGORY="network" 2.9 +SHORT_DESC="reliable and proven fax send and receive solution." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +TARBALL="$PACKAGE$VERSION-Feb22.tar.gz" 2.12 +WEB_SITE="http://mgetty.greenie.net/" 2.13 +WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/1.1/$TARBALL" 2.14 +CONFIG_FILES="/etc/mgetty+sendfax" 2.15 + 2.16 +# Rules to configure and make the package. 2.17 +compile_rules() 2.18 +{ 2.19 + 2.20 + cd $src 2.21 + [ -f Makefile.dist ] && mv -f Makefile.dist Makefile 2.22 + cp Makefile Makefile.dist 2.23 + cp Makefile Makefile.install 2.24 + cp policy.h-dist policy.h 2.25 + sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h 2.26 + sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \ 2.27 + -e "s|^spool=/var/spool|spool=/var/spool|" \ 2.28 + -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \ 2.29 + Makefile 2.30 + sed -i -e "s|^prefix=/usr/local|prefix=$PWD/_pkg/usr|" \ 2.31 + -e "s|^spool=/var/spool|spool=$PWD/_pkg/var/spool|" \ 2.32 + -e "s|^CONFDIR=.*|CONFDIR=$PWD/_pkg/etc/mgetty+sendfax|" \ 2.33 + -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \ 2.34 + Makefile.install 2.35 + make bin-all vgetty 2.36 + mkdir -p _pkg/var/spool 2.37 + mv -f Makefile.install Makefile 2.38 + make -k install.bin vgetty-install || true 2.39 +} 2.40 + 2.41 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.42 +genpkg_rules() 2.43 +{ 2.44 + mkdir -p $fs/usr 2.45 + cp -a $_pkg/usr/lib $fs/usr 2.46 + cp -a $_pkg/usr/sbin $fs/usr 2.47 + cp -a $_pkg/etc $fs 2.48 + cp -a $_pkg/var $fs 2.49 + chmod 755 $fs/var/spool/fax 2.50 + for i in $(cd $WOK; ls -d mgetty-*) 2.51 + do 2.52 + tazwok cook $i 2.53 + done 2.54 +} 2.55 + 2.56 +# Pre and post install commands for Tazpkg. 2.57 +post_install() 2.58 +{ 2.59 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 2.60 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 2.61 +$(cd $1/ ; find etc/mgetty+sendfax -type f) 2.62 +EOT 2.63 + # adduser fax if needed 2.64 + if ! grep -q fax $1/etc/passwd; then 2.65 + echo -n "Adding user fax..." 2.66 + chroot $1/ adduser fax -D -H -S 2.67 + status 2.68 + fi 2.69 + chown fax $fs/var/spool/fax 2.70 +} 2.71 + 2.72 +post_remove() 2.73 +{ 2.74 + deluser fax 2.75 +} 2.76 + 2.77 +repack_cleanup() 2.78 +{ 2.79 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 2.80 +}