wok-6.x annotate mgetty/receipt @ rev 23988

syslinux: iso2exe/init scan all partitions
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 03 09:39:27 2020 +0000 (2020-12-03)
parents a4a2b897d572
children 34e801e0eb52
rev   line source
pascal@1337 1 # SliTaz package receipt.
pascal@1337 2
pascal@1337 3 PACKAGE="mgetty"
Hans-G?nter@23179 4 VERSION="1.2.1"
pascal@1337 5 CATEGORY="network"
Hans-G?nter@23179 6 SHORT_DESC="Reliable and proven fax send and receive solution."
pascal@1337 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15002 8 LICENSE="GPL2"
pascal@1337 9 WEB_SITE="http://mgetty.greenie.net/"
Hans-G?nter@23179 10
Hans-G?nter@23179 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@17869 12 WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/${VERSION%.*}/$TARBALL"
Hans-G?nter@23179 13
pascal@1977 14 DEPENDS="slitaz-base-files"
Hans-G?nter@23179 15
pascal@1337 16 CONFIG_FILES="/etc/mgetty+sendfax"
pascal@1337 17
pascal@1337 18 # Rules to configure and make the package.
pascal@1337 19 compile_rules()
pascal@1337 20 {
Hans-G?nter@23179 21 chmod a+x mkidirs
Hans-G?nter@23179 22
pascal@1337 23 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
pascal@1337 24 cp Makefile Makefile.dist
pascal@1337 25 cp Makefile Makefile.install
pascal@1337 26 cp policy.h-dist policy.h
Hans-G?nter@23179 27 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' \
Hans-G?nter@23179 28 policy.h
pascal@1337 29 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \
pascal@1337 30 -e "s|^spool=/var/spool|spool=/var/spool|" \
pascal@1337 31 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
pascal@19291 32 -e 's|/man/|/share&|' \
pascal@1337 33 Makefile
slaxemulator@13199 34 sed -i -e "s|^prefix=/usr/local|prefix=$DESTDIR/usr|" \
slaxemulator@13199 35 -e "s|^spool=/var/spool|spool=$DESTDIR/var/spool|" \
slaxemulator@13199 36 -e "s|^CONFDIR=.*|CONFDIR=$DESTDIR/etc/mgetty+sendfax|" \
pascal@19291 37 -e 's|/man/|/share&|' \
pascal@1337 38 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
pascal@1337 39 Makefile.install
pascal@23881 40 make -j 1 bin-all vgetty
Hans-G?nter@23179 41 mkdir -p $DESTDIR/var/spool $DESTDIR/usr/share/man/man1
Hans-G?nter@23179 42 mkdir -p $DESTDIR/usr/share/man/man8
pascal@1337 43 mv -f Makefile.install Makefile
pascal@18425 44 sed -i 's|chown|echo chown|' Makefile fax/Makefile
pascal@23881 45 make -j 1 -k install.bin vgetty-install
pascal@1337 46 }
pascal@1337 47
pascal@1337 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1337 49 genpkg_rules()
pascal@1337 50 {
pascal@1337 51 mkdir -p $fs/usr
Hans-G?nter@23179 52 cp -a $install/usr/lib $fs/usr
Hans-G?nter@23179 53 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@23179 54 cp -a $install/etc $fs
Hans-G?nter@23179 55 cp -a $install/var $fs
Hans-G?nter@23179 56 chmod 755 $fs/var/spool/fax
pascal@1337 57 }
pascal@1337 58
pascal@1337 59 # Pre and post install commands for Tazpkg.
pascal@1337 60 post_install()
pascal@1337 61 {
pascal@1337 62 # adduser fax if needed
Hans-G?nter@23179 63 if ! grep -q fax "$1/etc/passwd"
Hans-G?nter@23179 64 then
pascal@20319 65 echo
pascal@1337 66 echo -n "Adding user fax..."
pascal@18730 67 chroot "$1/" adduser fax -D -H -S
pascal@1337 68 status
pascal@1337 69 fi
pascal@18730 70 chroot "$1/" chown fax /var/spool/fax
pascal@1337 71 }
pascal@1337 72
pascal@1337 73 post_remove()
pascal@1337 74 {
pascal@18730 75 chroot "$1/" deluser fax
pascal@1337 76 }