wok-next view mgetty/receipt @ rev 21153

Small updates.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jan 31 16:45:41 2019 +0200 (2019-01-31)
parents 4396aed7eb01
children 137aa1cf5f85
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://mgetty.greenie.net/"
11 TARBALL="$PACKAGE$VERSION-Jun05.tar.gz"
12 WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/${VERSION%.*}/$TARBALL"
14 SPLIT="$PACKAGE-voicetools"
16 compile_rules() {
17 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
18 cp Makefile Makefile.dist
19 cp Makefile Makefile.install
20 cp policy.h-dist policy.h
21 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
22 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \
23 -e "s|^spool=/var/spool|spool=/var/spool|" \
24 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
25 -e 's|/man/|/share&|' \
26 Makefile
27 sed -i -e "s|^prefix=/usr/local|prefix=$install/usr|" \
28 -e "s|^spool=/var/spool|spool=$install/var/spool|" \
29 -e "s|^CONFDIR=.*|CONFDIR=$install/etc/mgetty+sendfax|" \
30 -e 's|/man/|/share&|' \
31 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
32 Makefile.install
33 make bin-all vgetty
34 mkdir -p $install/var/spool $install/usr/share/man/man1 \
35 $install/usr/share/man/man8
36 mv -f Makefile.install Makefile
37 sed -i 's|chown|echo chown|' Makefile fax/Makefile
38 make -k install.bin vgetty-install
39 }
41 genpkg_rules() {
42 case $PACKAGE in
43 mgetty)
44 mkdir -p $fs/usr
45 cp -a $install/usr/lib $fs/usr
46 cp -a $install/usr/sbin $fs/usr
47 cp -a $install/etc $fs
48 cp -a $install/var $fs
49 chmod 755 $fs/var/spool/fax
50 DEPENDS="slitaz-base-files"
51 CONFIG_FILES="/etc/mgetty+sendfax"
52 ;;
53 mgetty-voicetools)
54 mkdir -p $fs/usr
55 cp -a $install/usr/bin $fs/usr
56 CAT="network|convertion tool set for vgetty"
57 DEPENDS="mgetty"
58 ;;
59 esac
60 }
62 # adduser fax if needed
63 post_install_mgetty() {
64 if ! grep -q fax "$1/etc/passwd"; then
65 echo -n "Adding user fax..."
66 chroot "$1/" adduser fax -D -H -S
67 status
68 fi
69 chroot "$1/" chown fax /var/spool/fax
70 }
72 post_remove_mgetty() {
73 chroot "$1/" deluser fax
74 }