Tim Biermann
17c4671a40
Hi Jürgen, this is a bit bigger and if you are not opposed, I'll continue with openldap/krb5 👼 1. Included a few security patches 2. Add support for a bunch of optional dependencies 3. set the correct rundir with `configure` 4. Enables the use of core/libtirpc and core/libcap by default I have been running this in a productive environment and it works great (e.g. ldap support, argon password hashes and postgres backend). If you agree to the changes, a squash commit via gitea ui will suffice 😄 Thanks! Reviewed-on: #8 Co-authored-by: Tim Biermann <tbier@posteo.de> Co-committed-by: Tim Biermann <tbier@posteo.de>
72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
# Description: IMAP and POP3 server with ssl/ipv6 support, written with security primarily in mind
|
|
# URL: https://dovecot.org
|
|
# Maintainer: Juergen Daubert, jue at crux dot nu
|
|
# Depends on: bzip2 libcap linux-pam openssl sqlite xz zlib
|
|
# Optional: clucene cyrus-sasl icu krb5 libsodium lua53 lz4 mariadb nss openldap postgresql
|
|
|
|
name=dovecot
|
|
version=2.3.21
|
|
release=1
|
|
source=(https://dovecot.org/releases/2.3/$name-$version.tar.gz
|
|
dovecot-2.3.21-openssl3_fixes-1.patch
|
|
dovecot-2.3.21-security_fix-1.patch
|
|
dovecot.rc dovecot.pam)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
patch -Np1 -i $SRC/dovecot-2.3.21-openssl3_fixes-1.patch
|
|
patch -Np1 -i $SRC/dovecot-2.3.21-security_fix-1.patch
|
|
autoreconf -fvi
|
|
|
|
prt-get isinst clucene && PKGMK_DOVECOT+=' --with-lucene'
|
|
prt-get isinst icu && PKGMK_DOVECOT+=' --with-icu'
|
|
prt-get isinst krb5 && PKGMK_DOVECOT+=' --with-gssapi'
|
|
prt-get isinst libsodium && PKGMK_DOVECOT+=' --with-sodium'
|
|
prt-get isinst lua53 && PKGMK_DOVECOT+=' --with-lua=plugin'
|
|
prt-get isinst mariadb && PKGMK_DOVECOT+=' --with-mysql'
|
|
prt-get isinst nss && PKGMK_DOVECOT+=' --with-nss'
|
|
prt-get isinst openldap && PKGMK_DOVECOT+=' --with-ldap=plugin'
|
|
prt-get isinst postgresql && PKGMK_DOVECOT+=' --with-pgsql'
|
|
|
|
CPPFLAGS="-I/usr/include/tirpc" \
|
|
LDFLAGS+=" -ltirpc" \
|
|
./configure $PKGMK_DOVECOT \
|
|
--prefix=/usr \
|
|
--libexecdir=/usr/lib \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--with-rundir=/run/dovecot \
|
|
--with-moduledir=/usr/lib/dovecot/modules \
|
|
--with-rundir=/run/dovecot \
|
|
--with-sql \
|
|
--with-sqlite \
|
|
--with-libcap \
|
|
--with-pam \
|
|
--with-ssl=openssl
|
|
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
cp -r $PKG/usr/share/doc/dovecot/example-config/* $PKG/etc/dovecot
|
|
|
|
# RC script
|
|
install -D -m 755 $SRC/dovecot.rc $PKG/etc/rc.d/dovecot
|
|
|
|
# PAM
|
|
install -D -m 644 $SRC/dovecot.pam $PKG/etc/pam.d/dovecot
|
|
|
|
# SSL
|
|
install -d $PKG/etc/ssl/{certs,private}
|
|
touch $PKG/etc/ssl/certs/dovecot.pem
|
|
touch $PKG/etc/ssl/private/dovecot.pem
|
|
chmod 0600 $PKG/etc/ssl/{certs/dovecot.pem,private/dovecot.pem}
|
|
|
|
# directories
|
|
install -d -m 0750 $PKG/var/lib/dovecot
|
|
|
|
# cleanup
|
|
rm -r $PKG/usr/share/doc
|
|
rm $PKG/etc/dovecot/README
|
|
}
|