SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "mgetty"

# SliTaz package receipt.

PACKAGE="mgetty"
VERSION="1.1.37"
CATEGORY="network"
SHORT_DESC="reliable and proven fax send and receive solution."
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE$VERSION-Jun05.tar.gz"
WEB_SITE="http://mgetty.greenie.net/"
WGET_URL="ftp://mgetty.greenie.net/pub/$PACKAGE/source/1.1/$TARBALL"
DEPENDS="slitaz-base-files"
CONFIG_FILES="/etc/mgetty+sendfax"

# Rules to configure and make the package.
compile_rules()
{

    cd $src
    [ -f Makefile.dist ] && mv -f Makefile.dist Makefile
    cp Makefile Makefile.dist
    cp Makefile Makefile.install
    cp policy.h-dist policy.h
    sed -i  -e 's|/* #define AUTO_PPP */|#define AUTO_PPP|' policy.h
    sed -i  -e "s|^prefix=/usr/local|prefix=/usr|" \
        -e "s|^spool=/var/spool|spool=/var/spool|" \
        -e "s|^CONFDIR=.*|CONFDIR=/etc/mgetty+sendfax|" \
        Makefile
    sed -i  -e "s|^prefix=/usr/local|prefix=$PWD/_pkg/usr|" \
        -e "s|^spool=/var/spool|spool=$PWD/_pkg/var/spool|" \
        -e "s|^CONFDIR=.*|CONFDIR=$PWD/_pkg/etc/mgetty+sendfax|" \
        -e 's|^INSTALL=install .*|INSTALL=install -c -o root -g root|' \
        Makefile.install
    make bin-all vgetty
    mkdir -p _pkg/var/spool
    mv -f Makefile.install Makefile
    make -k install.bin vgetty-install || true
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $_pkg/usr/lib $fs/usr
    cp -a $_pkg/usr/sbin $fs/usr
    cp -a $_pkg/etc $fs
    cp -a $_pkg/var $fs
    chmod 755 $fs/var/spool/fax
}

# Pre and post install commands for Tazpkg.
post_install()
{
        # adduser fax if needed
    if ! grep -q fax $1/etc/passwd; then
        echo -n "Adding user fax..."
        chroot $1/ adduser fax -D -H -S
        status
    fi
    chroot $1/ chown fax /var/spool/fax
}

post_remove()
{
    deluser fax
}
3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)