wok-6.x view mgetty/receipt @ rev 15526
Add epm
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 20 16:06:44 2013 +0000 (2013-11-20) |
parents | 7896f0694ef6 |
children | d3eb5f4b53ea |
line source
1 # SliTaz package receipt.
3 PACKAGE="mgetty"
4 VERSION="1.1.37"
5 CATEGORY="network"
6 SHORT_DESC="reliable and proven fax send and receive solution."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE$VERSION-Jun05.tar.gz"
10 WEB_SITE="http://mgetty.greenie.net/"
11 WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/1.1/$TARBALL"
12 DEPENDS="slitaz-base-files"
13 CONFIG_FILES="/etc/mgetty+sendfax"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
19 cd $src
20 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
21 cp Makefile Makefile.dist
22 cp Makefile Makefile.install
23 cp policy.h-dist policy.h
24 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
25 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \
26 -e "s|^spool=/var/spool|spool=/var/spool|" \
27 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
28 Makefile
29 sed -i -e "s|^prefix=/usr/local|prefix=$DESTDIR/usr|" \
30 -e "s|^spool=/var/spool|spool=$DESTDIR/var/spool|" \
31 -e "s|^CONFDIR=.*|CONFDIR=$DESTDIR/etc/mgetty+sendfax|" \
32 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
33 Makefile.install
34 make bin-all vgetty
35 mkdir -p $DESTDIR/var/spool $DESTDIR/usr/man/man1
36 mv -f Makefile.install Makefile
37 make -k install.bin vgetty-install || true
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/usr
44 cp -a $install/usr/lib $fs/usr
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/etc $fs
47 cp -a $install/var $fs
48 chmod 755 $fs/var/spool/fax
49 }
51 # Pre and post install commands for Tazpkg.
52 post_install()
53 {
54 # adduser fax if needed
55 if ! grep -q fax $1/etc/passwd; then
56 echo -n "Adding user fax..."
57 chroot $1/ adduser fax -D -H -S
58 status
59 fi
60 chroot $1/ chown fax /var/spool/fax
61 }
63 post_remove()
64 {
65 chroot $1/ deluser fax
66 }