1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../postfix/postfix.conf
5 # Copyright (C) 2004 - 2007 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 pkg_postfix_premake() {
17 pkginstalled cyrus-sasl2 && {
18 var_append CCARGS ' ' "-DUSE_SASL_AUTH -I$( pkgprefix includedir cyrus-sasl2 )"
19 var_append AUXLIBS ' ' "-L$( pkgprefix libdir cyrus-sasl2 ) -lsasl2"
21 pkginstalled openldap && {
22 var_append CCARGS ' ' "-DHAS_LDAP -I$( pkgprefix includedir openldap )"
23 var_append AUXLIBS ' ' "-L$( pkgprefix libdir openldap ) -lldap -llber"
25 pkginstalled mysql && {
26 var_append CCARGS ' ' "-DHAS_MYSQL -I$( pkgprefix includedir mysql )/mysql -R$( pkgprefix libdir mysql )/mysql"
27 var_append AUXLIBS ' ' "-L$( pkgprefix libdir mysql )/mysql -lmysqlclient -lz -lm"
28 var_append LD_RUN_PATH ':' "$( pkgprefix libdir mysql )/mysql"
31 pkginstalled openssl && {
32 var_append CCARGS ' ' "-DHAS_SSL -I$( pkgprefix includedir openssl )"
33 var_append AUXLIBS ' ' "-L$( pkgprefix libdir openssl ) -lssl -lcrypto"
37 $MAKE -f Makefile.init makefiles
40 pkg_postfix_inmake() {
41 chmod +x postfix-install
43 # Due to the compare and remove operation in the install file we really
44 # need to really modify the config and the filenames - the
45 # INSTALL_WRAPPER can not be used.
47 sed -i -e "s,man1/mailq.1,man1/mailq_postfix.1," \
48 -e "s,man1/newaliases.1,man1/newaliases_postfix.1," \
49 -e "s,man5/aliases.5,man5/aliases_postfix.5," \
51 mv man/man5/aliases{,_postfix}.5
52 mv man/man1/newaliases{,_postfix}.1
53 mv man/man1/mailq{,_postfix}.1
56 pkg_postfix_postmake() {
57 ./postfix-install -non-interactive \
58 sendmail_path=$sbindir/sendmail_postfix \
59 newaliases_path=$bindir/newaliases_postfix \
60 mailq_path=$bindir/mailq_postfix \
62 manpage_directory=$mandir \
63 sample_directory=$docdir \
64 readme_directory=$docdir
65 install_setmailer postfix
69 hook_add premake 5 pkg_postfix_premake
70 hook_add inmake 5 pkg_postfix_inmake
72 hook_add postmake 5 "pkg_postfix_postmake"