wok-6.x annotate mgetty/receipt @ rev 18973
splashutils: fix build, update URLs, add description
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Mar 12 14:29:04 2016 +0200 (2016-03-12) |
parents | 1debe89dc518 |
children | e8c84b81fa04 |
rev | line source |
---|---|
pascal@1337 | 1 # SliTaz package receipt. |
pascal@1337 | 2 |
pascal@1337 | 3 PACKAGE="mgetty" |
slaxemulator@6858 | 4 VERSION="1.1.37" |
pascal@1337 | 5 CATEGORY="network" |
pascal@1337 | 6 SHORT_DESC="reliable and proven fax send and receive solution." |
pascal@1337 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
slaxemulator@6858 | 9 TARBALL="$PACKAGE$VERSION-Jun05.tar.gz" |
pascal@1337 | 10 WEB_SITE="http://mgetty.greenie.net/" |
pascal@17869 | 11 WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/${VERSION%.*}/$TARBALL" |
pascal@1977 | 12 DEPENDS="slitaz-base-files" |
pascal@1337 | 13 CONFIG_FILES="/etc/mgetty+sendfax" |
pascal@1337 | 14 |
pascal@1337 | 15 # Rules to configure and make the package. |
pascal@1337 | 16 compile_rules() |
pascal@1337 | 17 { |
pascal@1337 | 18 [ -f Makefile.dist ] && mv -f Makefile.dist Makefile |
pascal@1337 | 19 cp Makefile Makefile.dist |
pascal@1337 | 20 cp Makefile Makefile.install |
pascal@1337 | 21 cp policy.h-dist policy.h |
pascal@1337 | 22 sed -i -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h |
pascal@1337 | 23 sed -i -e "s|^prefix=/usr/local|prefix=/usr|" \ |
pascal@1337 | 24 -e "s|^spool=/var/spool|spool=/var/spool|" \ |
pascal@1337 | 25 -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \ |
pascal@1337 | 26 Makefile |
slaxemulator@13199 | 27 sed -i -e "s|^prefix=/usr/local|prefix=$DESTDIR/usr|" \ |
slaxemulator@13199 | 28 -e "s|^spool=/var/spool|spool=$DESTDIR/var/spool|" \ |
slaxemulator@13199 | 29 -e "s|^CONFDIR=.*|CONFDIR=$DESTDIR/etc/mgetty+sendfax|" \ |
pascal@1337 | 30 -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \ |
pascal@1337 | 31 Makefile.install |
pascal@1337 | 32 make bin-all vgetty |
pascal@15241 | 33 mkdir -p $DESTDIR/var/spool $DESTDIR/usr/man/man1 |
pascal@1337 | 34 mv -f Makefile.install Makefile |
pascal@18425 | 35 sed -i 's|chown|echo chown|' Makefile fax/Makefile |
pascal@18425 | 36 make -k install.bin vgetty-install |
pascal@1337 | 37 } |
pascal@1337 | 38 |
pascal@1337 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1337 | 40 genpkg_rules() |
pascal@1337 | 41 { |
pascal@1337 | 42 mkdir -p $fs/usr |
slaxemulator@13199 | 43 cp -a $install/usr/lib $fs/usr |
slaxemulator@13199 | 44 cp -a $install/usr/sbin $fs/usr |
slaxemulator@13199 | 45 cp -a $install/etc $fs |
slaxemulator@13199 | 46 cp -a $install/var $fs |
pascal@1337 | 47 chmod 755 $fs/var/spool/fax |
pascal@1337 | 48 } |
pascal@1337 | 49 |
pascal@1337 | 50 # Pre and post install commands for Tazpkg. |
pascal@1337 | 51 post_install() |
pascal@1337 | 52 { |
pascal@1337 | 53 # adduser fax if needed |
pascal@18730 | 54 if ! grep -q fax "$1/etc/passwd"; then |
pascal@1337 | 55 echo -n "Adding user fax..." |
pascal@18730 | 56 chroot "$1/" adduser fax -D -H -S |
pascal@1337 | 57 status |
pascal@1337 | 58 fi |
pascal@18730 | 59 chroot "$1/" chown fax /var/spool/fax |
pascal@1337 | 60 } |
pascal@1337 | 61 |
pascal@1337 | 62 post_remove() |
pascal@1337 | 63 { |
pascal@18730 | 64 chroot "$1/" deluser fax |
pascal@1337 | 65 } |