wok-stable view mgetty/receipt @ rev 5829

Up: libxfcegui4* (4.6.4)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Fri Jul 16 08:02:26 2010 +0200 (2010-07-16)
parents 43431755fb4c
children 9cbcdb219b50
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 DEPENDS="slitaz-base-files"
12 CONFIG_FILES="/etc/mgetty+sendfax"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
18 cd $src
19 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
20 cp Makefile Makefile.dist
21 cp Makefile Makefile.install
22 cp policy.h-dist policy.h
23 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
24 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \
25 -e "s|^spool=/var/spool|spool=/var/spool|" \
26 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
27 Makefile
28 sed -i -e "s|^prefix=/usr/local|prefix=$PWD/_pkg/usr|" \
29 -e "s|^spool=/var/spool|spool=$PWD/_pkg/var/spool|" \
30 -e "s|^CONFDIR=.*|CONFDIR=$PWD/_pkg/etc/mgetty+sendfax|" \
31 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
32 Makefile.install
33 make bin-all vgetty
34 mkdir -p _pkg/var/spool
35 mv -f Makefile.install Makefile
36 make -k install.bin vgetty-install || true
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr
43 cp -a $_pkg/usr/lib $fs/usr
44 cp -a $_pkg/usr/sbin $fs/usr
45 cp -a $_pkg/etc $fs
46 cp -a $_pkg/var $fs
47 chmod 755 $fs/var/spool/fax
48 for i in $(cd $WOK; ls -d mgetty-*)
49 do
50 tazwok cook $i
51 done
52 }
54 # Pre and post install commands for Tazpkg.
55 post_install()
56 {
57 # adduser fax if needed
58 if ! grep -q fax $1/etc/passwd; then
59 echo -n "Adding user fax..."
60 chroot $1/ adduser fax -D -H -S
61 status
62 fi
63 chroot $1/ chown fax /var/spool/fax
64 }
66 post_remove()
67 {
68 deluser fax
69 }