SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "ssmtp"

# SliTaz package receipt.

PACKAGE="ssmtp"
VERSION="2.64"
CATEGORY="network"
SHORT_DESC="Extremely simple MTA to get mail off the system to a mailhub."
MAINTAINER="rocky@slitaz.org"
LICENSE="GPL2"
TARBALL="${PACKAGE}_${VERSION}.orig.tar.bz2"
WEB_SITE="https://packages.debian.org/stable/mail/ssmtp"
WGET_URL="http://ftp.debian.org/debian/pool/main/s/ssmtp/$TARBALL"
CONFIG_FILES="/etc/ssmtp/ssmtp.conf /etc/ssmtp/revaliases"

DEPENDS="openssl"
BUILD_DEPENDS="openssl-dev"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/latest/d;/${PACKAGE}_/!d;/orig/!d;s|.*${PACKAGE}_\\(.*\\).orig.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's|@LIBS@|& -lcrypto|' Makefile.in
    ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --mandir=/usr/share/man \
        --enable-md5auth \
        --enable-ssl \
        $CONFIGURE_ARGS &&
    make

    # Install
    mkdir -p $DESTDIR/usr/sbin $DESTDIR/etc/ssmtp
    cp ssmtp $DESTDIR/usr/sbin
    cp revaliases ssmtp.conf $DESTDIR/etc/ssmtp
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $install/usr/sbin/ $fs/usr/
    cp -a $install/etc/ $fs/
}

post_install()
{
    ln -sf /usr/sbin/ssmtp "$1/usr/sbin/sendmail"
    ln -sf /usr/sbin/ssmtp "$1/usr/sbin/newaliases"
    ln -sf /usr/sbin/ssmtp "$1/usr/sbin/mailq"
}

post_remove()
{
    rm -f "$1/usr/sbin/sendmail"
    rm -f "$1/usr/sbin/newaliases"
    rm -f "$1/usr/sbin/mailq"
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)