# SliTaz package receipt. PACKAGE="postfix" VERSION="3.4.5" CATEGORY="network" SHORT_DESC="Fast, easy to administer, and secure mailer." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="other" WEB_SITE="http://www.postfix.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="http://postfix.mirrors.ovh.net/$PACKAGE-release/official/$TARBALL" PROVIDE="sendmail" DEPENDS="libdb libldap pcre libssl slitaz-base-files libsasl libkrb5 \ libcomerr3 libmysqlclient" BUILD_DEPENDS="db-dev openldap-dev pcre-dev openssl-dev perl mysql-dev \ cyrus-sasl-dev libsasl" TAZPANEL_DAEMON="man|edit::/etc/postfix/main.cf|options|web::$WEB_SITE" CONFIG_FILES="/etc/postfix" # What is the latest version available today? current_version() { wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[0-9\.]*tar/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { make makefiles \ CCARGS='-DHAS_DB -DHAS_LDAP \ -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I /usr/include/sasl \ -DHAS_MYSQL -I/usr/include/mysql \ -DDEF_DAEMON_DIR=\"/usr/lib/postfix\" \ -DUSE_TLS \ -DDEF_MANPAGE_DIR=\"/usr/share/man\"' \ AUXLIBS="-ldb -lldap -llber -lsasl2 -lssl -lcrypto -lpthread \ -L/usr/lib/mysql -lmysqlclient -lz -lm " && make export install_root=$DESTDIR sh postfix-install -non-interactive 2>&1 | grep -v warning: } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/share/licenses/ cp -a $install/usr/lib $fs/usr cp -a $install/usr/bin $fs/usr cp -a $install/usr/sbin $fs/usr cp -a $install/etc $fs awk 'BEGIN {n=0} /MUST/ {n++} /ALIASES/ {n++} { if (n==1) print }' \ < $install/etc/postfix/aliases > $fs/etc/postfix/aliases while read keyword data; do grep -q ^$keyword $fs/etc/postfix/main.cf && continue mv $fs/etc/postfix/main.cf $fs/etc/postfix/main.cf.$$ awk "BEGIN { scan=1 } /^#$keyword / { if (scan) { print \"$keyword $data\" ; scan=0 } } { print }" \ < $fs/etc/postfix/main.cf.$$ > $fs/etc/postfix/main.cf rm -f $fs/etc/postfix/main.cf.$$ done << EOF mydomain = localdomain myorigin = localhost mydestination = localhost, localhost.\$mydomain mynetworks = 127.0.0.0/8 alias_maps = hash:/etc/postfix/aliases EOF cat >> $fs/etc/postfix/main.cf <