blob: 98d6622b80814557dfa52a79aa3bafe487e8f291 (
plain)
1 # Description: Postfix Mail Transport Agent (MTA)
2 # URL: http://www.postfix.org
3 # Maintainer: Thomas Penteker, tek at serverop dot de
4 # Packager: Victor, victord at users dot berlios dot de
5 # Depends on: cyrus-sasl
6
7 name=postfix
8 version=2.11.8
9 release=1
10 source=(ftp://ftp.porcupine.org/mirrors/postfix-release/official/$name-$version.tar.gz \
11 aliases postfix.rc postfix.patch)
12
13 build() {
14 cd $name-$version
15
16 patch -p1 < $SRC/postfix.patch
17
18 # enable building on 4.x kernels
19 sed -i 's:\(Linux.3\*\)):\1|Linux.4*):1' makedefs
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/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 #
56 # Add .gz extensions to manpages (pkgmk compresses them)
57 # *LICENSE files will be removed
58 #
59 ( cd $PKG/usr/lib/postfix
60 cp postfix-files temp-files
61 grep -v LICENSE temp-files | sed 's#\(/man[0-9]/[a-zA-Z0-9_-]\+\.[0-9]\):#\1\.gz:#' > postfix-files
62 rm -f temp-files $PKG/etc/postfix/*LICENSE )
63
64 install -D -m 00644 ../aliases $PKG/etc/postfix/aliases
65 install -D -m 00755 ../postfix.rc $PKG/etc/rc.d/postfix
66
67 touch $PKG/etc/postfix/{aliases,access,canonical,relocated,transport,virtual}.db
68 touch $PKG/etc/postfix/{relay_domains,body_checks,mime_header_checks}
69 }
|