blob: f6558141232efd6efa6e32b28aa89953b7cf81ac (
plain)
1 # Description: Postfix Mail Transport Agent (MTA)
2 # URL: http://www.postfix.org
3 # Maintainer: Thomas Penteker, tek at serverop dot de
4 # Depends on: cyrus-sasl
5
6 name=postfix
7 version=3.1.11
8 release=1
9 source=(ftp://ftp.porcupine.org/mirrors/postfix-release/official/$name-$version.tar.gz \
10 aliases postfix.rc postfix.patch)
11
12 build() {
13 cd $name-$version
14
15 patch -p1 < $SRC/postfix.patch
16
17 # enable building on recent kernels
18 sed -i 's:\(Linux\.\[34\):\15:1' makedefs
19 sed -i 's:\(|| defined(LINUX4)\):\1 || defined(LINUX5):g' src/util/sys_defs.h
20
21 _CCARGS="$CCARGS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS -I/usr/include/openssl"
22 _AUXLIBS="-L/usr/lib -lsasl2 -lssl -lcrypto"
23
24 make tidy
25 make makefiles DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS"
26 make DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS"
27
28 make non-interactive-package install_root=$PKG \
29 mail_owner=mail \
30 setgid_group=postdrop \
31 config_directory=/etc/postfix \
32 manpage_directory=/usr/share/man \
33 daemon_directory=/usr/lib/postfix \
34 data_directory=/var/lib/postfix \
35 command_directory=/usr/sbin \
36 queue_directory=/var/spool/postfix \
37 sendmail_path=/usr/sbin/sendmail \
38 newaliases_path=/usr/bin/newaliases \
39 mailq_path=/usr/bin/mailq
40
41 #
42 # Set proper permissions
43 #
44 ( cd $PKG/var/spool/postfix
45 chown mail *
46 chgrp postdrop public maildrop )
47
48 ( cd $PKG/usr/sbin
49 chgrp postdrop postqueue postdrop
50 chmod g+s postqueue postdrop )
51
52 ( cd $PKG/var/lib
53 chown mail postfix )
54
55 rm -f $PKG/etc/postfix/*LICENSE
56
57 install -D -m 00644 ../aliases $PKG/etc/postfix/aliases
58 install -D -m 00755 ../postfix.rc $PKG/etc/rc.d/postfix
59
60 touch $PKG/etc/postfix/{aliases,access,canonical,relocated,transport,virtual}.db
61 touch $PKG/etc/postfix/{relay_domains,body_checks,mime_header_checks}
62 }
|