1 #################################################
3 # Maintainer: Angel Velasquez <angvp@archlinux.org>
4 # Maintainer: judd <jvinet@zeroflux.org>
5 #################################################
7 # Maintainer: Ian K Armstrong <ian.k.armstrong@openmail.cc>
9 # dependencies added: libmysqlclient, libspf2, sqlite3
11 #################################################
15 pkgdesc="A Message Transfer Agent with MySQL and sqlite3 support"
16 arch=('i686' 'x86_64')
17 url="http://www.exim.org/"
19 backup=(etc/mail/aliases etc/mail/exim.conf etc/logrotate.d/exim etc/conf.d/exim)
21 depends=('db' 'pcre' 'pam' 'tcp_wrappers' 'openssl' 'libmysqlclient' 'libspf2' 'sqlite3')
23 provides=('smtp-server')
24 conflicts=('smtp-server')
25 options=('!makeflags')
26 source=(ftp://mirrors.24-7-solutions.net/pub/exim/ftp/exim/exim4/exim-${pkgver}.tar.bz2
32 md5sums=('5d746275f2cc85845567f9d5eb84a57a'
33 '4874006f0585253ddab027d441009757'
34 'ea39f58bffc16f5e3bbe59dffcf09449'
35 '9aed772e87223213e8da9ca5e7376869'
36 'e18a535218718c5eb394ed5c9296fe06'
37 'b75fe4c6e960a59a25b5f51e8f61ba3a')
40 # An exim user is required to build this
41 if [ ! `egrep '^exim' /etc/passwd` ]; then
42 echo "==> Adding user exim"
43 sudo useradd -u 79 -g exim -d /var/spool/exim -s /bin/false exim
46 # An exim group is required to build this
47 if [ ! `egrep '^exim' /etc/group` ]; then
48 echo "==> Adding group exim"
49 sudo groupadd -g 79 exim
52 cd ${srcdir}/exim-${pkgver}
54 BIN_DIRECTORY=/usr/sbin
55 CONFIGURE_FILE=/etc/mail/exim.conf
58 SPOOL_DIRECTORY=/var/spool/exim
59 INCLUDE=-I/usr/include
63 ROUTER_MANUALROUTE=yes
64 ROUTER_QUERYPROGRAM=yes
66 TRANSPORT_APPENDFILE=yes
67 TRANSPORT_AUTOREPLY=yes
76 LOOKUP_INCLUDE=-I /usr/include/mysql
77 LOOKUP_LIBS=-L/usr/lib -lmysqlclient -lsqlite3
80 CFLAGS += -I/usr/include/spf2
82 FIXED_NEVER_USERS=root
87 HEADERS_CHARSET=\"UTF-8\"
89 TLS_LIBS=-L/usr/lib -lssl -lcrypto
90 TLS_INCLUDE=-I/usr/include/openssl
91 LOG_FILE_PATH=/var/log/exim/%slog
92 COMPRESS_COMMAND=/bin/gzip
94 ZCAT_COMMAND=/bin/zcat
96 CFLAGS=-O -I/usr/include
97 EXTRALIBS_EXIM=-L/usr/lib -lwrap -lpam
98 SYSTEM_ALIASES_FILE=/etc/mail/aliases
99 CHOWN_COMMAND=/bin/chown
100 CHGRP_COMMAND=/bin/chgrp
101 CHMOD_COMMAND=/bin/chmod
104 TOUCH_COMMAND=/bin/touch
105 PERL_COMMAND=/usr/bin/perl
107 PID_FILE_PATH=/var/run/exim.pid
109 SUPPORT_MOVE_FROZEN_MESSAGES=yes">"Local/Makefile"
114 cd $srcdir/exim-$pkgver
115 install -D -m644 ../exim.logrotate ${pkgdir}/etc/logrotate.d/exim
116 install -D -m644 ../exim.conf.d ${pkgdir}/etc/conf.d/exim
117 install -D -m644 doc/exim.8 ${pkgdir}/usr/share/man/man8/exim.8
118 install -D -m755 ../exim ${pkgdir}/etc/rc.d/exim
119 mkdir -p ${pkgdir}/var/spool/exim/db ${pkgdir}/etc/mail \
120 ${pkgdir}/var/log/exim ${pkgdir}/usr/{lib,sbin}
121 chown root.exim ${pkgdir}/var/spool/exim ${pkgdir}/var/log/exim
122 chown exim.exim ${pkgdir}/var/spool/exim/db
123 chmod 770 ${pkgdir}/var/spool/exim ${pkgdir}/var/spool/exim/db ${pkgdir}/var/log/exim
125 inst_dest=${pkgdir}/usr/sbin inst_conf=${pkgdir}/etc/mail/exim.conf ../scripts/exim_install
126 cd ${srcdir}/exim-${pkgver}/src
127 sed "s|/etc/aliases|/etc/mail/aliases|g" configure.default | \
128 sed "s|SYSTEM_ALIASES_FILE|/etc/mail/aliases|g" \
129 >${pkgdir}/etc/mail/exim.conf
131 cp ${srcdir}/aliases ${pkgdir}/etc/mail
132 cp ${srcdir}/newaliases ${pkgdir}/usr/sbin
133 cd ${pkgdir}/usr/sbin
140 ln -s ../sbin/exim ../lib/sendmail
142 mkdir -p ${pkgdir}/etc/rc.d
143 cp ${srcdir}/exim ${pkgdir}/etc/rc.d