2012-03-22 05:40:23 +00:00
|
|
|
# $Id: PKGBUILD 75460 2010-04-01 16:56:22Z giovanni $
|
|
|
|
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
|
|
|
# Contributor: tobias <tobias@archlinux.org>
|
|
|
|
# Contributor: Tobias Kieslich <tobias@justdreams.de>
|
|
|
|
|
|
|
|
# ----------- NOTE TO ALL USERS ------------
|
|
|
|
# Go read http://www.courier-mta.org/install.html b4 running or building courier
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - fix LDFLAGS setting for us
|
|
|
|
|
|
|
|
plugrel=1
|
|
|
|
|
|
|
|
pkgname=courier-mta
|
2012-06-03 17:42:46 +00:00
|
|
|
pkgver=0.68.1
|
2012-05-06 17:14:42 +00:00
|
|
|
pkgrel=1
|
2012-03-22 05:40:23 +00:00
|
|
|
pkgdesc="IMAP(s)/POP3(s) and SMTP Server with ML-manager, webmail and webconfig"
|
|
|
|
arch=(i686 x86_64)
|
|
|
|
license=('GPL2')
|
|
|
|
backup=('etc/courier/imapd.cnf' 'etc/courier/pop3d.cnf' \
|
|
|
|
'etc/courier/imapd' 'etc/courier/imapd-ssl' \
|
|
|
|
'etc/courier/pop3d' 'etc/courier/pop3d-ssl' \
|
|
|
|
'etc/courier/courierd' 'etc/courier/sqwebmaild' \
|
|
|
|
'etc/courier/esmtpd' 'etc/courier/esmtpd-ssl' \
|
|
|
|
'etc/courier/esmtpd.cnf' 'etc/courier/esmtpd-msa' \
|
|
|
|
'etc/courier/webadmin/password' 'etc/courier/esmtpauthclient' \
|
|
|
|
'etc/conf.d/courier-mta')
|
|
|
|
url="http://courier-mta.org"
|
|
|
|
depends=('courier-authlib>=0.63.0' 'gamin' 'gcc-libs' 'gdbm' 'pcre' 'mime-types' 'ca-certificates')
|
|
|
|
optdepends=('libldap')
|
|
|
|
makedepends=('apache' 'pam' 'expect' 'gnupg' 'libldap' 'gamin')
|
|
|
|
provides=('smtp-server' 'smtp-forwarder' 'imap-server' 'pop3-server' 'courier-imap' 'courier-maildrop')
|
|
|
|
conflicts=('courier-imap' 'smtp-forwarder' 'smtp-server' 'imap-server' 'courier-maildrop' 'ucspi-tcp')
|
|
|
|
options=('!libtool')
|
|
|
|
install=courier-mta.install
|
|
|
|
source=(http://downloads.sourceforge.net/project/courier/courier/${pkgver}/courier-${pkgver}.tar.bz2
|
|
|
|
courier.rc.d
|
|
|
|
courier-mta.rc.d
|
|
|
|
courier-mta.conf.d
|
|
|
|
esmtpd.rc.d
|
|
|
|
esmtpd-ssl.rc.d
|
|
|
|
esmtpd-msa.rc.d
|
|
|
|
imapd.rc.d
|
|
|
|
imapd-ssl.rc.d
|
|
|
|
pop3d.rc.d
|
|
|
|
pop3d-ssl.rc.d
|
|
|
|
webmaild.rc.d)
|
2012-06-03 17:42:46 +00:00
|
|
|
md5sums=('d894f57186933480e116350e7e0df8bc'
|
2012-03-22 05:40:23 +00:00
|
|
|
'9055ba622efd37603186ce1f37277224'
|
|
|
|
'5cbeb5c323706058e545f74ad7752ebe'
|
|
|
|
'f3ff70b40c7a1f7a017e8c4cc4d92f4f'
|
|
|
|
'caabce8c7b66296b602316aa5af5d4c5'
|
|
|
|
'1c8b1b66ebafa4ff09ffc0106a9dc82c'
|
|
|
|
'dae6c7d5ff0cce0fba5729fedf2a9051'
|
|
|
|
'd0cc5eab5d3e0ec33dadd0392421f63e'
|
|
|
|
'5873a96aa149edda281730010fb4db34'
|
|
|
|
'faa09e06a5dc41ee89ab1f8fa6886b63'
|
|
|
|
'520501daa66c0a94f2e9844ce4919a09'
|
|
|
|
'33a93f400c3e87bcd207295b7d7333ca')
|
|
|
|
|
|
|
|
# MIGRATION NOTE:
|
|
|
|
# In 2012, support for courier-mta.conf.d and courier-mta.rc.d will be removed.
|
|
|
|
# Remove those files and this note and also courier-mta.install
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${srcdir}/courier-${pkgver}
|
|
|
|
|
|
|
|
# fix a tiny bug
|
|
|
|
sed -i -e \
|
|
|
|
's|--with-authchangepwdir=/var/tmp/dev/null|--with-authchangepwdir=$libexecdir/authlib|' \
|
|
|
|
configure && chmod 755 configure
|
|
|
|
|
2012-05-06 18:22:26 +00:00
|
|
|
LDFLAGS+="-L/usr/lib/courier-authlib -lcourierauth"
|
2012-03-22 05:40:23 +00:00
|
|
|
echo $LDFLAGS
|
|
|
|
# courier is more about configuring than compiling :-), lets start the mess
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--sysconfdir=/etc/courier \
|
|
|
|
--libdir=/usr/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--localstatedir=/var/spool/courier \
|
|
|
|
--disable-root-check \
|
|
|
|
--enable-unicode \
|
|
|
|
--enable-workarounds-for-imap-client-bugs \
|
|
|
|
--enable-mimetypes=/etc/mime.types \
|
|
|
|
--with-piddir=/var/run/courier \
|
|
|
|
--with-locking-method=lockf \
|
|
|
|
--with-trashquota \
|
|
|
|
--with-db=gdbm \
|
|
|
|
--with-trashquota \
|
|
|
|
--with-random=/dev/urandom --without-ispell \
|
|
|
|
--with-mailuser=courier --with-mailgroup=courier \
|
|
|
|
--with-certdb=/etc/ssl/certs/
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ${srcdir}/courier-${pkgver}
|
|
|
|
|
|
|
|
#chown mail.mail ${pkgdir}/var/spool/courier
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
# docs say we can get rid of those after make
|
|
|
|
find ${pkgdir} -name '*\.a' -exec -rm -f {} \;
|
|
|
|
# install the perftest-script for testings
|
|
|
|
install -Dm755 courier/perftest1 ${pkgdir}/usr/lib/courier/perftest1
|
|
|
|
###############################################################################
|
|
|
|
# this is what usually "make install-configure" does
|
|
|
|
# *.dist files get rid of "dist"
|
|
|
|
for distfile in ${pkgdir}/etc/courier/*.dist; do
|
|
|
|
mv ${distfile} ${pkgdir}/etc/courier/$(basename ${distfile} .dist)
|
|
|
|
done
|
|
|
|
# install pam files according to the layout used in Archlinux
|
|
|
|
for pamfile in ${pkgdir}/etc/courier/*.authpam; do
|
|
|
|
sed -i 's|/lib/security/pam_pwdb\.so|pam_unix.so|' ${pamfile}
|
|
|
|
#echo "password required pam_unix.so" >> $pamfile
|
|
|
|
install -Dm 644 ${pamfile} \
|
|
|
|
${pkgdir}/etc/pam.d/$(basename ${pamfile} .authpam | sed "s/d$//")
|
|
|
|
rm -f ${pamfile}
|
|
|
|
done
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Arch Linux specific tweaks to make things easier for the user
|
|
|
|
# create passwordfile for webadmin -> standard archwebadmin
|
|
|
|
sed -i 's|/etc/courier/webadmin/password|$(DESTDIR)/etc/courier/webadmin/password|g' Makefile
|
|
|
|
yes "archwebadmin" | make DESTDIR=${pkgdir} install-webadmin-password
|
|
|
|
# arch specific scripts
|
|
|
|
install -Dm 644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/courier-mta
|
|
|
|
install -Dm 755 ${srcdir}/${pkgname}.rc.d ${pkgdir}/etc/rc.d/courier-mta
|
|
|
|
install -D -m 755 ${srcdir}/courier.rc.d ${pkgdir}/etc/rc.d/courier
|
|
|
|
install -D -m 755 ${srcdir}/imapd.rc.d ${pkgdir}/etc/rc.d/imapd
|
|
|
|
install -D -m 755 ${srcdir}/imapd-ssl.rc.d ${pkgdir}/etc/rc.d/imapd-ssl
|
|
|
|
install -D -m 755 ${srcdir}/pop3d.rc.d ${pkgdir}/etc/rc.d/pop3d
|
|
|
|
install -D -m 755 ${srcdir}/pop3d-ssl.rc.d ${pkgdir}/etc/rc.d/pop3d-ssl
|
|
|
|
install -D -m 755 ${srcdir}/esmtpd.rc.d ${pkgdir}/etc/rc.d/esmtpd
|
|
|
|
install -D -m 755 ${srcdir}/esmtpd-ssl.rc.d ${pkgdir}/etc/rc.d/esmtpd-ssl
|
|
|
|
install -D -m 755 ${srcdir}/esmtpd-msa.rc.d ${pkgdir}/etc/rc.d/esmtpd-msa
|
|
|
|
install -D -m 755 ${srcdir}/webmaild.rc.d ${pkgdir}/etc/rc.d/webmaild
|
|
|
|
#install -Dm 655 ${srcdir}/courier-webmail-cleancache.cron.hourly \
|
|
|
|
# ${pkgdir}/etc/cron.hourly/courier-webmail-cleancache
|
|
|
|
# bug http://bugs.archlinux.org/task/5154
|
|
|
|
find ${pkgdir}/usr/lib -name '*\.a' -exec rm -f {} \;
|
|
|
|
# fixing some permissions
|
|
|
|
chown -R courier:courier ${pkgdir}/usr/lib/courier/modules
|
|
|
|
rm -r ${pkgdir}/var/run
|
|
|
|
#chown -R courier:courier ${pkgdir}/var/run/courier
|
|
|
|
chown root:root ${pkgdir}/usr/{.,bin,lib,sbin,share}
|
|
|
|
# make a link to /usr/sbin/sendmail
|
|
|
|
install -dm 755 ${pkgdir}/usr/sbin
|
|
|
|
cd ${pkgdir}/usr/sbin
|
|
|
|
ln -s ../bin/sendmail ./sendmail
|
|
|
|
}
|