From 2bc19bd1f7d8d2341f759a88ddbd9c0f66390633 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 31 Jan 2012 15:43:27 +0100 Subject: [PATCH] New package: dovecot-2.0.17. --- srcpkgs/dovecot-plugin-ldap | 1 + srcpkgs/dovecot-plugin-mysql | 1 + srcpkgs/dovecot-plugin-pgsql | 1 + srcpkgs/dovecot-plugin-sqlite | 1 + srcpkgs/dovecot/INSTALL | 22 +++++ srcpkgs/dovecot/dovecot-plugin-ldap.rshlibs | 4 + srcpkgs/dovecot/dovecot-plugin-ldap.template | 19 ++++ srcpkgs/dovecot/dovecot-plugin-mysql.rshlibs | 9 ++ srcpkgs/dovecot/dovecot-plugin-mysql.template | 17 ++++ srcpkgs/dovecot/dovecot-plugin-pgsql.rshlibs | 3 + srcpkgs/dovecot/dovecot-plugin-pgsql.template | 18 ++++ srcpkgs/dovecot/dovecot-plugin-sqlite.rshlibs | 4 + .../dovecot/dovecot-plugin-sqlite.template | 16 ++++ srcpkgs/dovecot/dovecot.rshlibs | 14 +++ srcpkgs/dovecot/patches/mkcert-ssldir.patch | 13 +++ srcpkgs/dovecot/template | 86 +++++++++++++++++++ 16 files changed, 229 insertions(+) create mode 120000 srcpkgs/dovecot-plugin-ldap create mode 120000 srcpkgs/dovecot-plugin-mysql create mode 120000 srcpkgs/dovecot-plugin-pgsql create mode 120000 srcpkgs/dovecot-plugin-sqlite create mode 100644 srcpkgs/dovecot/INSTALL create mode 100644 srcpkgs/dovecot/dovecot-plugin-ldap.rshlibs create mode 100644 srcpkgs/dovecot/dovecot-plugin-ldap.template create mode 100644 srcpkgs/dovecot/dovecot-plugin-mysql.rshlibs create mode 100644 srcpkgs/dovecot/dovecot-plugin-mysql.template create mode 100644 srcpkgs/dovecot/dovecot-plugin-pgsql.rshlibs create mode 100644 srcpkgs/dovecot/dovecot-plugin-pgsql.template create mode 100644 srcpkgs/dovecot/dovecot-plugin-sqlite.rshlibs create mode 100644 srcpkgs/dovecot/dovecot-plugin-sqlite.template create mode 100644 srcpkgs/dovecot/dovecot.rshlibs create mode 100644 srcpkgs/dovecot/patches/mkcert-ssldir.patch create mode 100644 srcpkgs/dovecot/template diff --git a/srcpkgs/dovecot-plugin-ldap b/srcpkgs/dovecot-plugin-ldap new file mode 120000 index 0000000000..abeb1d0499 --- /dev/null +++ b/srcpkgs/dovecot-plugin-ldap @@ -0,0 +1 @@ +dovecot \ No newline at end of file diff --git a/srcpkgs/dovecot-plugin-mysql b/srcpkgs/dovecot-plugin-mysql new file mode 120000 index 0000000000..abeb1d0499 --- /dev/null +++ b/srcpkgs/dovecot-plugin-mysql @@ -0,0 +1 @@ +dovecot \ No newline at end of file diff --git a/srcpkgs/dovecot-plugin-pgsql b/srcpkgs/dovecot-plugin-pgsql new file mode 120000 index 0000000000..abeb1d0499 --- /dev/null +++ b/srcpkgs/dovecot-plugin-pgsql @@ -0,0 +1 @@ +dovecot \ No newline at end of file diff --git a/srcpkgs/dovecot-plugin-sqlite b/srcpkgs/dovecot-plugin-sqlite new file mode 120000 index 0000000000..abeb1d0499 --- /dev/null +++ b/srcpkgs/dovecot-plugin-sqlite @@ -0,0 +1 @@ +dovecot \ No newline at end of file diff --git a/srcpkgs/dovecot/INSTALL b/srcpkgs/dovecot/INSTALL new file mode 100644 index 0000000000..a848156155 --- /dev/null +++ b/srcpkgs/dovecot/INSTALL @@ -0,0 +1,22 @@ +case "${ACTION}" in +post) + if [ -f etc/ssl/private/dovecot.pem -a -f etc/ssl/certs/dovecot.pem ]; then + exit 0 + fi + echo "Creating self-signed certificate..." + usr/sbin/dovecot-mkcert.sh + + cat <<_EOF +========================================================================== + +A self-signed certificate for SSL has been created automatically, but +this should be created again with proper settings in dovecot-openssl.cnf: + + $ rm -f /etc/ssl/{certs,private}/dovecot.pem + $ [edit /etc/ssl/dovecot-openssl.cnf] + $ /usr/sbin/dovecot-mkcert.sh + +========================================================================== +_EOF + ;; +esac diff --git a/srcpkgs/dovecot/dovecot-plugin-ldap.rshlibs b/srcpkgs/dovecot/dovecot-plugin-ldap.rshlibs new file mode 100644 index 0000000000..8b6b1b0591 --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-ldap.rshlibs @@ -0,0 +1,4 @@ +libldap-2.4.so.2 +liblber-2.4.so.2 +librt.so.1 +libc.so.6 diff --git a/srcpkgs/dovecot/dovecot-plugin-ldap.template b/srcpkgs/dovecot/dovecot-plugin-ldap.template new file mode 100644 index 0000000000..d6b3436260 --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-ldap.template @@ -0,0 +1,19 @@ +# Template file for 'dovecot-plugin-ldap'. +# +short_desc="${short_desc} - LDAP plugin" +long_desc="${long_desc} + + This package contains a plugin for LDAP authentication." + +Add_dependency run dovecot ">=${version}" + +conf_files="/etc/dovecot/conf.d/auth-ldap.conf.ext" + +do_install() { + vmove usr/lib/dovecot/modules/auth/libauthdb_ldap.so \ + usr/lib/dovecot/modules/auth + vmove usr/share/doc/dovecot/example-config/conf.d/auth-ldap.conf.ext \ + usr/share/doc/dovecot/example-config/conf.d + vmove etc/dovecot/conf.d/auth-ldap.conf.ext \ + etc/dovecot/conf.d +} diff --git a/srcpkgs/dovecot/dovecot-plugin-mysql.rshlibs b/srcpkgs/dovecot/dovecot-plugin-mysql.rshlibs new file mode 100644 index 0000000000..bf8e153eb1 --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-mysql.rshlibs @@ -0,0 +1,9 @@ +libmysqlclient.so.16 +libz.so.1 +libcrypt.so.1 +libnsl.so.1 +libm.so.6 +libssl.so.1 +libcrypto.so.1 +librt.so.1 +libc.so.6 diff --git a/srcpkgs/dovecot/dovecot-plugin-mysql.template b/srcpkgs/dovecot/dovecot-plugin-mysql.template new file mode 100644 index 0000000000..4350e2209a --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-mysql.template @@ -0,0 +1,17 @@ +# Template file for 'dovecot-plugin-mysql'. +# +short_desc="${short_desc} - MySQL plugin" +long_desc="${long_desc} + + This package contains a plugin for MySQL authentication and dictionaries." + +Add_dependency run dovecot ">=${version}" + +do_install() { + vmove usr/lib/dovecot/modules/auth/libdriver_mysql.so \ + usr/lib/dovecot/modules/auth + vmove usr/lib/dovecot/modules/dict/libdriver_mysql.so \ + usr/lib/dovecot/modules/dict + vmove usr/lib/dovecot/modules/libdriver_mysql.so \ + usr/lib/dovecot/modules +} diff --git a/srcpkgs/dovecot/dovecot-plugin-pgsql.rshlibs b/srcpkgs/dovecot/dovecot-plugin-pgsql.rshlibs new file mode 100644 index 0000000000..a5ed93c68d --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-pgsql.rshlibs @@ -0,0 +1,3 @@ +libpq.so.5 +librt.so.1 +libc.so.6 diff --git a/srcpkgs/dovecot/dovecot-plugin-pgsql.template b/srcpkgs/dovecot/dovecot-plugin-pgsql.template new file mode 100644 index 0000000000..93b04fbcca --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-pgsql.template @@ -0,0 +1,18 @@ +# Template file for 'dovecot-plugin-pgsql'. +# +short_desc="${short_desc} - PostgreSQL plugin" +long_desc="${long_desc} + + This package contains a plugin for PostgreSQL authentication + and dictionaries." + +Add_dependency run dovecot ">=${version}" + +do_install() { + vmove usr/lib/dovecot/modules/auth/libdriver_pgsql.so \ + usr/lib/dovecot/modules/auth + vmove usr/lib/dovecot/modules/dict/libdriver_pgsql.so \ + usr/lib/dovecot/modules/dict + vmove usr/lib/dovecot/modules/libdriver_pgsql.so \ + usr/lib/dovecot/modules +} diff --git a/srcpkgs/dovecot/dovecot-plugin-sqlite.rshlibs b/srcpkgs/dovecot/dovecot-plugin-sqlite.rshlibs new file mode 100644 index 0000000000..0efd468813 --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-sqlite.rshlibs @@ -0,0 +1,4 @@ +libsqlite3.so.0 +libz.so.1 +librt.so.1 +libc.so.6 diff --git a/srcpkgs/dovecot/dovecot-plugin-sqlite.template b/srcpkgs/dovecot/dovecot-plugin-sqlite.template new file mode 100644 index 0000000000..1bf5c84ce0 --- /dev/null +++ b/srcpkgs/dovecot/dovecot-plugin-sqlite.template @@ -0,0 +1,16 @@ +# Template file for 'dovecot-plugin-sqlite'. +# +short_desc="${short_desc} - SQLite plugin" +long_desc="${long_desc} + + This package contains a plugin for SQLite authentication and dictionaries." + +Add_dependency run dovecot ">=${version}" + +do_install() { + vmove usr/lib/dovecot/modules/auth/libdriver_sqlite.so \ + usr/lib/dovecot/modules/auth + vmove usr/lib/dovecot/modules/dict usr/lib/dovecot/modules + vmove usr/lib/dovecot/modules/libdriver_sqlite.so \ + usr/lib/dovecot/modules +} diff --git a/srcpkgs/dovecot/dovecot.rshlibs b/srcpkgs/dovecot/dovecot.rshlibs new file mode 100644 index 0000000000..b5f89adc8f --- /dev/null +++ b/srcpkgs/dovecot/dovecot.rshlibs @@ -0,0 +1,14 @@ +libdl.so.2 +librt.so.1 +libc.so.6 +libz.so.1 +libcrypt.so.1 +libssl.so.1 +libcrypto.so.1 +libbz2.so.1 +libcurl.so.4 +libexpat.so.1 +libpam.so.0 +libgssapi_krb5.so.2 +libkrb5.so.3 +libcap.so.2 diff --git a/srcpkgs/dovecot/patches/mkcert-ssldir.patch b/srcpkgs/dovecot/patches/mkcert-ssldir.patch new file mode 100644 index 0000000000..3841b025da --- /dev/null +++ b/srcpkgs/dovecot/patches/mkcert-ssldir.patch @@ -0,0 +1,13 @@ +Set correct path to OPENSSLCONFIG. + +--- doc/mkcert.sh.orig 2012-01-31 15:25:06.611718182 +0100 ++++ doc/mkcert.sh 2012-01-31 15:25:27.298222975 +0100 +@@ -5,7 +5,7 @@ + + OPENSSL=${OPENSSL-openssl} + SSLDIR=${SSLDIR-/etc/ssl} +-OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf} ++OPENSSLCONFIG=${OPENSSLCONFIG-${SSLDIR}/dovecot-openssl.cnf} + + CERTDIR=$SSLDIR/certs + KEYDIR=$SSLDIR/private diff --git a/srcpkgs/dovecot/template b/srcpkgs/dovecot/template new file mode 100644 index 0000000000..284563c923 --- /dev/null +++ b/srcpkgs/dovecot/template @@ -0,0 +1,86 @@ +# Template file for 'dovecot' +pkgname=dovecot +version=2.0.17 +homepage="http://dovecot.org" +distfiles="$homepage/releases/2.0/$pkgname-$version.tar.gz" +build_style=gnu-configure +configure_args="--with-moduledir=/usr/lib/dovecot/modules --with-sql=plugin +--disable-static --with-nss --with-pam --with-mysql --with-pgsql +--with-sqlite --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl +--with-gssapi --with-ldap=plugin --with-zlib --with-bzlib --with-libcap +--with-solr --with-docs --with-systemdsystemunitdir=/lib/systemd/system" +short_desc="IMAP and POP3 server written with security primarily in mind" +maintainer="Juan RP " +license="LGPL-2.1" +checksum=3f0d4289067d2355b4ce4a00265bf2b4bf6540bca8fdcecfc6ad20611da145d2 +long_desc=" + Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like + systems, written with security primarily in mind. Dovecot is an excellent + choice for both small and large installations. It's fast, simple to set + up, requires no special administration and it uses very little memory." + +subpackages="${pkgname}-plugin-ldap ${pkgname}-plugin-mysql" +subpackages="${subpackages} ${pkgname}-plugin-pgsql ${pkgname}-plugin-sqlite" + +systemd_services="dovecot.service true" +system_accounts="dovecot dovenull" +dovecot_homedir="/var/chroot" +dovenull_homedir="/var/chroot" + +conf_files=" +/etc/dovecot/conf.d/10-auth.conf +/etc/dovecot/conf.d/10-director.conf +/etc/dovecot/conf.d/10-logging.conf +/etc/dovecot/conf.d/10-mail.conf +/etc/dovecot/conf.d/10-master.conf +/etc/dovecot/conf.d/10-ssl.conf +/etc/dovecot/conf.d/15-lda.conf +/etc/dovecot/conf.d/20-imap.conf +/etc/dovecot/conf.d/20-lmtp.conf +/etc/dovecot/conf.d/20-pop3.conf +/etc/dovecot/conf.d/90-acl.conf +/etc/dovecot/conf.d/90-plugin.conf +/etc/dovecot/conf.d/90-quota.conf +/etc/dovecot/conf.d/auth-checkpassword.conf.ext +/etc/dovecot/conf.d/auth-deny.conf.ext +/etc/dovecot/conf.d/auth-master.conf.ext +/etc/dovecot/conf.d/auth-passwdfile.conf.ext +/etc/dovecot/conf.d/auth-sql.conf.ext +/etc/dovecot/conf.d/auth-static.conf.ext +/etc/dovecot/conf.d/auth-system.conf.ext +/etc/dovecot/conf.d/auth-vpopmail.conf.ext +/etc/dovecot/dovecot.conf +/etc/ssl/dovecot-openssl.cnf" + +Add_dependency run openssl ">=0" # for mkcert.sh + +Add_dependency build openssl-devel +Add_dependency build mit-krb5-devel +Add_dependency build libmysqlclient-devel +Add_dependency build postgresql-libs-devel +Add_dependency build sqlite-devel +Add_dependency build libldap-devel +Add_dependency build libcap-devel +Add_dependency build pam-devel +Add_dependency build libcurl-devel +Add_dependency build expat-devel + +post_install() { + local econfdir=usr/share/doc/dovecot/example-config + local econfdird=${econfdir}/conf.d + + # install example conf files and ssl.conf + vmkdir etc/dovecot/conf.d + install -m644 ${DESTDIR}/${econfdird}/*.conf \ + ${DESTDIR}/etc/dovecot/conf.d + install -m644 ${DESTDIR}/${econfdird}/*.conf.ext \ + ${DESTDIR}/etc/dovecot/conf.d + install -m644 ${DESTDIR}/${econfdir}/dovecot.conf ${DESTDIR}/etc/dovecot + vinstall doc/dovecot-openssl.cnf 644 etc/ssl + vinstall doc/mkcert.sh 755 usr/sbin dovecot-mkcert.sh + rm ${DESTDIR}/etc/dovecot/README + + # Remove development stuff. + rm -rf ${DESTDIR}/usr/include + rm -rf ${DESTDIR}/usr/share/aclocal +}