wok-next view mgetty/receipt @ rev 1460

aterm beaver chemtool gftp grisbi gtick gtk-gnutella klavaro leafpad mtpaint sylpheed wine xpad: update BUILD_DEPENDS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 03 20:14:14 2008 +0000 (2008-10-03)
parents
children bd6010223726
line source
1 # SliTaz package receipt.
3 PACKAGE="mgetty"
4 VERSION="1.1.35"
5 CATEGORY="network"
6 SHORT_DESC="reliable and proven fax send and receive solution."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE$VERSION-Feb22.tar.gz"
9 WEB_SITE="http://mgetty.greenie.net/"
10 WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/1.1/$TARBALL"
11 CONFIG_FILES="/etc/mgetty+sendfax"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
17 cd $src
18 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
19 cp Makefile Makefile.dist
20 cp Makefile Makefile.install
21 cp policy.h-dist policy.h
22 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
23 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \
24 -e "s|^spool=/var/spool|spool=/var/spool|" \
25 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
26 Makefile
27 sed -i -e "s|^prefix=/usr/local|prefix=$PWD/_pkg/usr|" \
28 -e "s|^spool=/var/spool|spool=$PWD/_pkg/var/spool|" \
29 -e "s|^CONFDIR=.*|CONFDIR=$PWD/_pkg/etc/mgetty+sendfax|" \
30 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
31 Makefile.install
32 make bin-all vgetty
33 mkdir -p _pkg/var/spool
34 mv -f Makefile.install Makefile
35 make -k install.bin vgetty-install || true
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr
42 cp -a $_pkg/usr/lib $fs/usr
43 cp -a $_pkg/usr/sbin $fs/usr
44 cp -a $_pkg/etc $fs
45 cp -a $_pkg/var $fs
46 chmod 755 $fs/var/spool/fax
47 for i in $(cd $WOK; ls -d mgetty-*)
48 do
49 tazwok cook $i
50 done
51 }
53 # Pre and post install commands for Tazpkg.
54 post_install()
55 {
56 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
57 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
58 $(cd $1/ ; find etc/mgetty+sendfax -type f)
59 EOT
60 # adduser fax if needed
61 if ! grep -q fax $1/etc/passwd; then
62 echo -n "Adding user fax..."
63 chroot $1/ adduser fax -D -H -S
64 status
65 fi
66 chown fax $fs/var/spool/fax
67 }
69 post_remove()
70 {
71 deluser fax
72 }
74 repack_cleanup()
75 {
76 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
77 }