1 # Description: Postfix Mail Transport Agent (MTA)
2 # URL: http://www.postfix.org
3 # Packager: Victor, victord at users dot berlios dot de
4 # Maintainer: Thomas Penteker, tek at serverop dot de
5 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
6 # Depends on: cyrus-sasl openssl db
11 source=(ftp://ftp.porcupine.org/mirrors/postfix-release/official/$name-$version.tar.gz
12 aliases postfix.rc postfix.patch)
17 patch -p1 < $SRC/postfix.patch
20 export SAVED_CC="$CC" SAVED_CXX="$CXX"
21 export SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS"
22 unset CC CXX CFLAGS CXXFLAGS
25 install -D -m 0755 bin/postconf aux/postconf-host
30 export CC="$SAVED_CC" CXX="$SAVED_CXX"
31 export CFLAGS="$SAVED_CFLAGS" CXXFLAGS="$SAVED_CXXFLAGS"
33 _CCARGS="$CCARGS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I$CLFS/usr/include/sasl -DUSE_TLS -I$CLFS/usr/include/openssl"
34 _AUXLIBS="-L$CLFS/usr/lib -lsasl2 -lssl -lcrypto"
37 make makefiles DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS"
38 make DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS" AR="$AR" RANLIB="$RANLIB"
40 sed -i postfix-install \
41 -e 's|bin/postconf|aux/postconf-host|'
43 make non-interactive-package \
46 setgid_group=postdrop \
47 config_directory=/etc/postfix \
48 manpage_directory=/usr/man \
49 daemon_directory=/usr/lib/postfix \
50 data_directory=/var/lib/postfix \
51 command_directory=/usr/sbin \
52 queue_directory=/var/spool/postfix \
53 sendmail_path=/usr/sbin/sendmail \
54 newaliases_path=/usr/bin/newaliases \
55 mailq_path=/usr/bin/mailq
58 # Set proper permissions
60 ( cd $PKG/var/spool/postfix
62 chgrp postdrop public maildrop )
65 chgrp postdrop postqueue postdrop
66 chmod g+s postqueue postdrop )
72 # Add .gz extensions to manpages (pkgmk compresses them)
73 # Remove LICENSE (will be removed)
76 cp postfix-files temp-files
77 grep -v LICENSE temp-files | sed 's#\(/man[0-9]/[a-zA-Z0-9_-]\+\.[0-9]\):#\1\.gz:#' > postfix-files
78 rm -f temp-files LICENSE )
80 install -D -m 00644 ../aliases $PKG/etc/postfix/aliases
81 install -D -m 00755 ../postfix.rc $PKG/etc/rc.d/postfix
83 touch $PKG/etc/postfix/{aliases,access,canonical,relocated,transport,virtual}.db
84 touch $PKG/etc/postfix/{relay_domains,body_checks,mime_header_checks}