Backupt of cyrus-imapd-2* from portage tree

This commit is contained in:
Sergey Morozov 2017-10-29 20:07:17 +03:00
parent 006b553665
commit 1d898bfe1c
11 changed files with 795 additions and 0 deletions

View File

@ -0,0 +1,12 @@
AUX cyrus-imapd-db.patch 2193 SHA256 b2b7520f59f109823db38a477aa2c953ce234cdb5fc17c19212ddc4d8c73290b SHA512 a756552c0f1dd548661b4402e170474977484f3a4b32e765f8648d02109dc131d313e924b07bb3ad704f34cab4aef079b206b6d1e8d97911657886bd2476910c WHIRLPOOL ac917da63126934a6e7e225cd35dcecc45d82e922b63a114e4f835753be9fbaac767bad03e1a1b2507ce91747d074bc2723869c117d66a07d99aeaaa47f5088d
AUX cyrus-imapd-sieve-libs.patch 2207 SHA256 a9cb5888e3208b0f125e32cc0671e22118caf63645a17e5d976048d2d80e8192 SHA512 1d198945b8522f587a84f6241dffe7e3390b4904b187d4d7b121a509f6d5d47270c2609eb6f3ffc0aa5a792cb576fd8e5572884439337f05485ada3533f81484 WHIRLPOOL 785c4681acfff9fd8ebdd572ae73aa45dacd2186d204836088b0208e9f2b12338140b3ac7c69e23014c8af19c84c51e23d648b356130faba1bb4e4635f653fb2
AUX cyrus.conf 1236 SHA256 e90288f4fd9903841a8bf8b984970600f3983e2b7825e8bddb71fb898aaff1fa SHA512 e4e02ddd02b7c77a1b43ee49f7ab9dcada1d518aaeae6e285b206d67d05b96a2f9007264967984c18cedc62cd1e9e9f59c802eb37da6e77d6990db7ced5e559a WHIRLPOOL 9f163e9e99452e6fc830c6eba22e102ffe9626aa38aa5d99fde566b7aee0a18b2b931bff8923a8da2367f1930aa52b8db9757c81250c03587dc07f9246490bee
AUX cyrus.confd 164 SHA256 4fd2424d388da2a821efbaf4cedcdeb6b15c832f64348fff8ae01264600d6c60 SHA512 52fda6a61a3cd1a4fa7579ea0eb1c9cba857f59b8ca9145f8bb73731c2a7e7f798663ef38b8c646aca066b0f571928fd13b2463415f8afd142fa45626ad8db20 WHIRLPOOL d9c0246bd0468f65e4b27b32920171adf6d3cede917c89d7b3656fd66bc55cc636f99f4420b4934a3807e067468b3504dbaccc0b866a454e66bb17638dc55471
AUX cyrus.pam-include 109 SHA256 d4ef9ed9c7c9add97df75f0e19a833bee872d3863a2b3cb1d0674fefba54e3d8 SHA512 4c96d5b0a675ddb83f26200a8cbd18c7b663aec39eb78f8509751425fb062e39e6d13e4d06090c6765b32e1cce609db075d725a18cbd4638a7f8ce5c858c47a4 WHIRLPOOL 96661c7bfa33f47c15629ba1d4b7ff34a5a83a2334e2862706c6da4bf5c05092c987f6df81dda8f7427c209afe29bc566d81a92e1e79e3a054911969fd717b5b
AUX cyrus.rc6 460 SHA256 43b297133b8ebf599761687bcf92f74942c641cc08fa77c67b5e6888bc726fc6 SHA512 926aa90c5285ed05bbc0cef5c4351acef26e70772bb7a0e490c05a9a4ce9e808e250e19bac1640a61852fa394e42368d33f88ea9b0b8d1751224daef04350920 WHIRLPOOL fcfce884577ae144bbb392b0d51927d990869e04984562eefaeeed5c99cfac3fd6cabb3a421868b0edf9914f76061711df5d8fbc383a4d6bdebaac0a6e420109
AUX imapd.conf 1471 SHA256 f4ebbf5fa953a8b893d79a722c4be9633f420295ed256726aea9c33eb13e7937 SHA512 dd19551b6e254c5e132f28748435ee61f2df86d6503643cd4946efcfba998d7bd487818ceaab1ca320289077eddd2531f6b05a493a5b5040ee5121165c3a712f WHIRLPOOL 2809fb8c3283386ef55a1ae1779514c2f3c7b407a7560ee74c5bfabd29d6ae6158f8184b7ad17176a0b55ff1484baf66f0245d3a6fb21e55a03c502e35b4abb1
DIST cyrus-imapd-2.5.10.tar.gz 3103914 SHA256 b38f4fd72825a298ac47426dcd2a50c8437c2947864ba50d79a9a53fe9845c5f SHA512 78b85e37c63f1dbb60898da229f70f45810326a01244067d23b1317e2c2ae3326e48b6944787d59024e44c48c441ed2b848d6a83c451c192a3bb95c8f37880fa WHIRLPOOL d2167900596c1b6f8e595de7aec499a7fbd6228537d7a27bec4fe0bda6a74b861303c4e9691ca829994972b099f29c362f9692f266df66d76c05a69629b52dfd
DIST cyrus-imapd-2.5.11.tar.gz 3109188 SHA256 36a79117b320c78d62bc6842c3024d970d3bec7aa12908f862d92cf1d63397d5 SHA512 bbb0e11f31d91d85037306321165e3608f8d5e2699b971fc4fbdd1630ec0a1485c8f6f17900142dec584ab41b0ec0c65c11cfaf8c5bbf1054b194a8f5f361538 WHIRLPOOL e6aaedb642b634d9fc0c56f7ddd06e15130091bd21f4e089ae46168fb2976c7e1fa281f8c6fc0f3e171e70bbfeb5cec8f6cc613f62d5b769fb8b6af4dede6e67
EBUILD cyrus-imapd-2.5.10.ebuild 4676 SHA256 7b86bec0be67cc662712fe6734b8c0c011a296eeb56bdc01f075d1a0495143ca SHA512 80bd9c18c80d5408862f4ad20b4f0f82c21b3a11f5ef54e504cdea454e0a7fde5f0cd8ffbf455665b0a907eadc243c45d5ccae9a08dde5faca7ff2f9cddb1ceb WHIRLPOOL c7fdd4647ed6d211520da29f619a6442377e8d6a6ef93b6dbdee3148fc8ce071ee42f0055026923d6b7231b542d11fcb7dfda224fbb5566c1fbdf213a9f33c81
EBUILD cyrus-imapd-2.5.11-r1.ebuild 4772 SHA256 27af620af50e6d70d44c781dc9a01f3ef99afdbf13378ac4e2842657ca361a58 SHA512 c14ac12b41bb9594b7686ff6f1fe44e9af160f8eed4cfa7e1c94d1c5098fb55ec160b7b6bfe30bfca494278d18bfd3c9c37a8ed3991e02889512d43f9dd4ceb1 WHIRLPOOL 6a0db0e1440225bd693a35efdee364913007f445d184df5235a8851644051ce3e925dc7472207a62b6f6c3c17b3a1c8b1ee0547003a930d6561ac915b536bd51
EBUILD cyrus-imapd-2.5.11.ebuild 4709 SHA256 6ccf2d3c818f0e387ce8652c0a3e745134bd88df4e62aab70f3c6ea32e886fcf SHA512 a07326ba69a7f81d900838e4796f85c90c00aaf16385818b8d3f47f70e77ff9a2de135a76effda42db5656b96f70c3369632c1138cb5fd377a2b8507da6e9d71 WHIRLPOOL e6c8f37a65d43a81a38065ca7b60521f6b769c48f8bbd0ef8f89c67b703cd8e2b3e4feffd679b0b7c3dcbd7cda3480fe41c73b802dc8f9b3dee83d527c9cd5c1

View File

@ -0,0 +1,177 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib pam ssl-cert user toolchain-funcs
MY_P=${P/_/}
DESCRIPTION="The Cyrus IMAP Server"
HOMEPAGE="http://www.cyrusimap.org/"
SRC_URI="ftp://ftp.cyrusimap.org/cyrus-imapd/${MY_P}.tar.gz"
LICENSE="BSD-with-attribution"
SLOT="0"
KEYWORDS="amd64 ~arm hppa ~ia64 ppc ppc64 sparc x86"
IUSE="afs berkdb clamav http kerberos mysql nntp pam perl postgres \
replication +server sieve snmp sqlite ssl static-libs tcpd"
# virtual/mysql-5.5 added for the --variable= option below
DEPEND="sys-libs/zlib
dev-libs/libpcre
>=dev-libs/cyrus-sasl-2.1.13
dev-libs/jansson
afs? ( net-fs/openafs )
berkdb? ( >=sys-libs/db-3.2:* )
clamav? ( app-antivirus/clamav )
http? ( dev-libs/libxml2 dev-libs/libical )
kerberos? ( virtual/krb5 )
mysql? ( >=virtual/mysql-5.5 )
nntp? ( !net-nntp/leafnode )
pam? (
virtual/pam
>=net-mail/mailbase-1
)
postgres? ( dev-db/postgresql:* )
snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
sqlite? ( dev-db/sqlite:3 )
ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )"
# all blockers really needed?
RDEPEND="${DEPEND}
!mail-mta/courier
!net-mail/bincimap
!net-mail/courier-imap
!net-mail/uw-imap
!net-mail/cyrus-imap-admin"
REQUIRED_USE="afs? ( kerberos )
http? ( sqlite )"
S=${WORKDIR}/${MY_P}
pkg_setup() {
enewuser cyrus -1 -1 /usr/cyrus mail
}
src_prepare() {
eapply -p0 "${FILESDIR}/${PN}-db.patch"
# Fix master(8)->cyrusmaster(8) manpage.
for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
sed -i -e 's:master\.8:cyrusmaster.8:g' \
-e 's:master(8):cyrusmaster(8):g' \
"${i}" || die "sed failed" || die "sed failed"
done
mv man/master.8 man/cyrusmaster.8 || die "mv failed"
sed -i -e "s:MASTER:CYRUSMASTER:g" \
-e "s:Master:Cyrusmaster:g" \
-e "s:master:cyrusmaster:g" \
man/cyrusmaster.8 || die "sed failed"
# lock.h to afs/lock.h
sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
ptclient/afskrb.c || die
eapply_user
eautoreconf
}
src_configure() {
local myconf
if use afs ; then
myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
myconf+=" --with-afs-incdir=/usr/include/afs"
fi
econf \
--enable-murder \
--enable-netscapehack \
--enable-idled \
--enable-event-notification \
--enable-autocreate \
--enable-pcre \
--with-service-path=/usr/$(get_libdir)/cyrus \
--with-cyrus-user=cyrus \
--with-cyrus-group=mail \
--with-com_err=yes \
--with-sasl \
--without-krb \
--without-krbdes \
--with-zlib \
$(use_enable afs) \
$(use_enable afs krb5afspts) \
$(use_with berkdb bdb) \
$(use_with clamav) \
$(use_enable nntp) \
$(use_enable http) \
$(use_enable replication) \
$(use_enable kerberos gssapi) \
$(use_with mysql) \
$(use_with postgres pgsql) \
$(use_with perl) \
$(use_with sqlite) \
$(use_with ssl openssl) \
$(use_enable server) \
$(use_enable sieve) \
$(use_with snmp) \
$(use_enable static-libs static) \
$(use_with tcpd libwrap) \
${myconf}
}
src_install() {
emake DESTDIR="${D}" INSTALLDIRS=vendor install
dodoc README*
dodoc -r doc
cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
cp -r contrib tools "${D}/usr/share/doc/${PF}"
rm -f doc/text/Makefile*
insinto /etc
doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
# turn off sieve if not installed
if ! use sieve; then
sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die
fi
newinitd "${FILESDIR}/cyrus.rc6" cyrus
newconfd "${FILESDIR}/cyrus.confd" cyrus
newpamd "${FILESDIR}/cyrus.pam-include" sieve
for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
keepdir "/var/${subdir}"
fowners cyrus:mail "/var/${subdir}"
fperms 0750 "/var/${subdir}"
done
for subdir in imap/{user,quota,sieve} spool/imap ; do
for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
keepdir "/var/${subdir}/${i}"
fowners cyrus:mail "/var/${subdir}/${i}"
fperms 0750 "/var/${subdir}/${i}"
done
done
}
pkg_preinst() {
if ! has_version ${CATEGORY}/${PN} ; then
elog "For correct logging add the following to /etc/syslog.conf:"
elog " local6.* /var/log/imapd.log"
elog " auth.debug /var/log/auth.log"
echo
elog "You have to add user cyrus to the sasldb2. Do this with:"
elog " saslpasswd2 cyrus"
fi
}
pkg_postinst() {
# do not install server.{key,pem) if they exist.
if use ssl ; then
if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
install_cert /etc/ssl/cyrus/server
chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
fi
fi
}

View File

@ -0,0 +1,180 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib pam ssl-cert user toolchain-funcs
MY_P=${P/_/}
DESCRIPTION="The Cyrus IMAP Server"
HOMEPAGE="http://www.cyrusimap.org/"
SRC_URI="ftp://ftp.cyrusimap.org/cyrus-imapd/${MY_P}.tar.gz"
LICENSE="BSD-with-attribution"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="afs berkdb clamav http kerberos mysql nntp pam perl postgres \
replication +server sieve snmp sqlite ssl static-libs tcpd"
# virtual/mysql-5.5 added for the --variable= option below
DEPEND="sys-libs/zlib
dev-libs/libpcre
>=dev-libs/cyrus-sasl-2.1.13
dev-libs/jansson
afs? ( net-fs/openafs )
berkdb? ( >=sys-libs/db-3.2:* )
clamav? ( app-antivirus/clamav )
http? ( dev-libs/libxml2 dev-libs/libical )
kerberos? ( virtual/krb5 )
mysql? ( >=virtual/mysql-5.5 )
nntp? ( !net-nntp/leafnode )
pam? (
virtual/pam
>=net-mail/mailbase-1
)
perl? ( dev-lang/perl:= )
postgres? ( dev-db/postgresql:* )
snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
sqlite? ( dev-db/sqlite:3 )
ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )"
# all blockers really needed?
RDEPEND="${DEPEND}
!mail-mta/courier
!net-mail/bincimap
!net-mail/courier-imap
!net-mail/uw-imap
!net-mail/cyrus-imap-admin"
REQUIRED_USE="afs? ( kerberos )
http? ( sqlite )"
S=${WORKDIR}/${MY_P}
pkg_setup() {
enewuser cyrus -1 -1 /usr/cyrus mail
}
src_prepare() {
eapply -p0 "${FILESDIR}/${PN}-db.patch"
# bug 604470
eapply -p1 "${FILESDIR}/${PN}-sieve-libs.patch"
# Fix master(8)->cyrusmaster(8) manpage.
for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
sed -i -e 's:master\.8:cyrusmaster.8:g' \
-e 's:master(8):cyrusmaster(8):g' \
"${i}" || die "sed failed" || die "sed failed"
done
mv man/master.8 man/cyrusmaster.8 || die "mv failed"
sed -i -e "s:MASTER:CYRUSMASTER:g" \
-e "s:Master:Cyrusmaster:g" \
-e "s:master:cyrusmaster:g" \
man/cyrusmaster.8 || die "sed failed"
# lock.h to afs/lock.h
sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
ptclient/afskrb.c || die
eapply_user
eautoreconf
}
src_configure() {
local myconf
if use afs ; then
myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
myconf+=" --with-afs-incdir=/usr/include/afs"
fi
econf \
--enable-murder \
--enable-netscapehack \
--enable-idled \
--enable-event-notification \
--enable-autocreate \
--enable-pcre \
--with-service-path=/usr/$(get_libdir)/cyrus \
--with-cyrus-user=cyrus \
--with-cyrus-group=mail \
--with-com_err=yes \
--with-sasl \
--without-krb \
--without-krbdes \
--with-zlib \
$(use_enable afs) \
$(use_enable afs krb5afspts) \
$(use_with berkdb bdb) \
$(use_with clamav) \
$(use_enable nntp) \
$(use_enable http) \
$(use_enable replication) \
$(use_enable kerberos gssapi) \
$(use_with mysql) \
$(use_with postgres pgsql) \
$(use_with perl) \
$(use_with sqlite) \
$(use_with ssl openssl) \
$(use_enable server) \
$(use_enable sieve) \
$(use_with snmp) \
$(use_enable static-libs static) \
$(use_with tcpd libwrap) \
${myconf}
}
src_install() {
emake DESTDIR="${D}" INSTALLDIRS=vendor install
dodoc README*
dodoc -r doc
cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
cp -r contrib tools "${D}/usr/share/doc/${PF}"
rm -f doc/text/Makefile*
insinto /etc
doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
# turn off sieve if not installed
if ! use sieve; then
sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die
fi
newinitd "${FILESDIR}/cyrus.rc6" cyrus
newconfd "${FILESDIR}/cyrus.confd" cyrus
newpamd "${FILESDIR}/cyrus.pam-include" sieve
for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
keepdir "/var/${subdir}"
fowners cyrus:mail "/var/${subdir}"
fperms 0750 "/var/${subdir}"
done
for subdir in imap/{user,quota,sieve} spool/imap ; do
for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
keepdir "/var/${subdir}/${i}"
fowners cyrus:mail "/var/${subdir}/${i}"
fperms 0750 "/var/${subdir}/${i}"
done
done
}
pkg_preinst() {
if ! has_version ${CATEGORY}/${PN} ; then
elog "For correct logging add the following to /etc/syslog.conf:"
elog " local6.* /var/log/imapd.log"
elog " auth.debug /var/log/auth.log"
echo
elog "You have to add user cyrus to the sasldb2. Do this with:"
elog " saslpasswd2 cyrus"
fi
}
pkg_postinst() {
# do not install server.{key,pem) if they exist.
if use ssl ; then
if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
install_cert /etc/ssl/cyrus/server
chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
fi
fi
}

View File

@ -0,0 +1,178 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib pam ssl-cert user toolchain-funcs
MY_P=${P/_/}
DESCRIPTION="The Cyrus IMAP Server"
HOMEPAGE="http://www.cyrusimap.org/"
SRC_URI="ftp://ftp.cyrusimap.org/cyrus-imapd/${MY_P}.tar.gz"
LICENSE="BSD-with-attribution"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="afs berkdb clamav http kerberos mysql nntp pam perl postgres \
replication +server sieve snmp sqlite ssl static-libs tcpd"
# virtual/mysql-5.5 added for the --variable= option below
DEPEND="sys-libs/zlib
dev-libs/libpcre
>=dev-libs/cyrus-sasl-2.1.13
dev-libs/jansson
afs? ( net-fs/openafs )
berkdb? ( >=sys-libs/db-3.2:* )
clamav? ( app-antivirus/clamav )
http? ( dev-libs/libxml2 dev-libs/libical )
kerberos? ( virtual/krb5 )
mysql? ( >=virtual/mysql-5.5 )
nntp? ( !net-nntp/leafnode )
pam? (
virtual/pam
>=net-mail/mailbase-1
)
perl? ( dev-lang/perl:= )
postgres? ( dev-db/postgresql:* )
snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
sqlite? ( dev-db/sqlite:3 )
ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )"
# all blockers really needed?
RDEPEND="${DEPEND}
!mail-mta/courier
!net-mail/bincimap
!net-mail/courier-imap
!net-mail/uw-imap
!net-mail/cyrus-imap-admin"
REQUIRED_USE="afs? ( kerberos )
http? ( sqlite )"
S=${WORKDIR}/${MY_P}
pkg_setup() {
enewuser cyrus -1 -1 /usr/cyrus mail
}
src_prepare() {
eapply -p0 "${FILESDIR}/${PN}-db.patch"
# Fix master(8)->cyrusmaster(8) manpage.
for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
sed -i -e 's:master\.8:cyrusmaster.8:g' \
-e 's:master(8):cyrusmaster(8):g' \
"${i}" || die "sed failed" || die "sed failed"
done
mv man/master.8 man/cyrusmaster.8 || die "mv failed"
sed -i -e "s:MASTER:CYRUSMASTER:g" \
-e "s:Master:Cyrusmaster:g" \
-e "s:master:cyrusmaster:g" \
man/cyrusmaster.8 || die "sed failed"
# lock.h to afs/lock.h
sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
ptclient/afskrb.c || die
eapply_user
eautoreconf
}
src_configure() {
local myconf
if use afs ; then
myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
myconf+=" --with-afs-incdir=/usr/include/afs"
fi
econf \
--enable-murder \
--enable-netscapehack \
--enable-idled \
--enable-event-notification \
--enable-autocreate \
--enable-pcre \
--with-service-path=/usr/$(get_libdir)/cyrus \
--with-cyrus-user=cyrus \
--with-cyrus-group=mail \
--with-com_err=yes \
--with-sasl \
--without-krb \
--without-krbdes \
--with-zlib \
$(use_enable afs) \
$(use_enable afs krb5afspts) \
$(use_with berkdb bdb) \
$(use_with clamav) \
$(use_enable nntp) \
$(use_enable http) \
$(use_enable replication) \
$(use_enable kerberos gssapi) \
$(use_with mysql) \
$(use_with postgres pgsql) \
$(use_with perl) \
$(use_with sqlite) \
$(use_with ssl openssl) \
$(use_enable server) \
$(use_enable sieve) \
$(use_with snmp) \
$(use_enable static-libs static) \
$(use_with tcpd libwrap) \
${myconf}
}
src_install() {
emake DESTDIR="${D}" INSTALLDIRS=vendor install
dodoc README*
dodoc -r doc
cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
cp -r contrib tools "${D}/usr/share/doc/${PF}"
rm -f doc/text/Makefile*
insinto /etc
doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
# turn off sieve if not installed
if ! use sieve; then
sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die
fi
newinitd "${FILESDIR}/cyrus.rc6" cyrus
newconfd "${FILESDIR}/cyrus.confd" cyrus
newpamd "${FILESDIR}/cyrus.pam-include" sieve
for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
keepdir "/var/${subdir}"
fowners cyrus:mail "/var/${subdir}"
fperms 0750 "/var/${subdir}"
done
for subdir in imap/{user,quota,sieve} spool/imap ; do
for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
keepdir "/var/${subdir}/${i}"
fowners cyrus:mail "/var/${subdir}/${i}"
fperms 0750 "/var/${subdir}/${i}"
done
done
}
pkg_preinst() {
if ! has_version ${CATEGORY}/${PN} ; then
elog "For correct logging add the following to /etc/syslog.conf:"
elog " local6.* /var/log/imapd.log"
elog " auth.debug /var/log/auth.log"
echo
elog "You have to add user cyrus to the sasldb2. Do this with:"
elog " saslpasswd2 cyrus"
fi
}
pkg_postinst() {
# do not install server.{key,pem) if they exist.
if use ssl ; then
if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
install_cert /etc/ssl/cyrus/server
chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
fi
fi
}

View File

@ -0,0 +1,81 @@
--- configure.ac 2015-07-06 01:22:19.000000000 +0000
+++ configure.ac 2015-07-22 11:18:33.000000000 +0000
@@ -236,50 +236,29 @@
dnl Berkeley DB Detection
AC_ARG_WITH(bdb,
- [AS_HELP_STRING([--with-bdb=DIR], [use Berkeley DB (in DIR) [yes]])],
- with_bdb=$withval, with_bdb="yes")
-
-dnl support old-style
-AC_ARG_WITH(dbdir,, with_bdb=$withval)
+ [AS_HELP_STRING([--with-bdb], [use Berkeley DB [yes]])],
+ [],
+ [with_bdb="yes"])
+# On a properly installed system, we build
+# by including <db.h> and by linking with -ldb
case "$with_bdb" in
- no)
- use_berkeley="no"
- ;;
- yes)
- use_berkeley="yes"
- with_bdb_lib=none
- with_bdb_inc=none
- ;;
- *)
- use_berkeley="yes"
- with_bdb_lib="$with_bdb/lib"
- with_bdb_inc="$with_bdb/include"
+ no) ;;
+ *) AC_CHECK_FILE([/usr/include/db.h],
+ [],
+ AC_CHECK_FILE([/usr/include/db/db.h]),
+ [BDB_INC="-I/usr/include/db"],
+ AC_MSG_ERROR([No <db.h> include file is found. Install the
+ appropriate db*-devel package first.]))
+ BDB_LIB="-ldb"
+ AC_SUBST(BDB_INC)
+ AC_SUBST(BDB_LIB)
+ LIBS="${LIBS} ${BDB_LIB}"
+ CPPFLAGS="${CPPFLAGS} ${BDB_INC}"
+ AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
;;
esac
-
-if test "$use_berkeley" != "no"; then
- CYRUS_BERKELEY_DB_CHK()
-
- if test "$dblib" = "no"; then
- AC_MSG_ERROR([Berkeley DB 3.x or later was not found. You may need to
- supply the --with-bdb-libdir or --with-bdb-incdir configure options.])
- fi
-
- if test "$with_bdb_lib" != "none"; then
- CMU_ADD_LIBPATH($with_bdb_lib)
- fi
-
- BDB_INC=${BDB_INCADD}
- BDB_LIB=${BDB_LIBADD}
- AC_SUBST(BDB_INC)
- AC_SUBST(BDB_LIB)
-
- LIBS="${LIBS} ${BDB_LIBADD}"
- CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
- AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
-fi
-AM_CONDITIONAL([USE_BERKELEY], [test "$use_berkeley" != "no"])
+AM_CONDITIONAL([USE_BERKELEY], [test "$with_bdb" != "no"])
dnl End Berkeley DB Detection
@@ -1800,7 +1779,7 @@
pcre: $cyrus_cv_pcre_utf8
Database support:
- bdb: $use_berkeley
+ bdb: $with_bdb
mysql: $with_mysql
postgresql: $use_pgsql
sqlite: $use_sqlite

View File

@ -0,0 +1,43 @@
--- a/configure.ac 2016-10-17 23:01:04.000000000 +0200
+++ b/configure.ac 2016-12-28 02:42:37.936610002 +0100
@@ -400,6 +379,7 @@
fi
LIBS="${LIBS} ${SQLITE_LIBADD}"
+ AC_SUBST(SQLITE_LIBADD)
CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}"
AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?])
@@ -437,7 +416,9 @@
fi
if test "$cyrus_cv_pcre_utf8" = "yes"; then
- LIBS="$LIBS -lpcre -lpcreposix";
+ PCRE_LIBS="-lpcre -lpcreposix"
+ AC_SUBST(PCRE_LIBS)
+ LIBS="$LIBS $PCRE_LIBS"
AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?])
AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?])
else
--- a/perl/imap/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200
+++ b/perl/imap/Makefile.PL.in 2016-12-28 02:42:04.559449967 +0100
@@ -69,7 +69,7 @@
'clean' => {'FILES' => 'libcyrperl.a cyradm'},
'OBJECT' => 'IMAP.o',
'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
- 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
+ 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
'INC' => "@BDB_INC@ -I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap",
'EXE_FILES' => [cyradm],
--- a/perl/sieve/managesieve/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200
+++ b/perl/sieve/managesieve/Makefile.PL.in 2016-12-28 02:42:34.496490437 +0100
@@ -52,7 +52,7 @@
'ABSTRACT' => 'Cyrus Sieve management interface',
'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
'MYEXTLIB' => '../lib/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
- 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
+ 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
'CCFLAGS' => '@COV_CFLAGS@',
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
'INC' => "@BDB_INC@ -I@top_srcdir@/lib -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",

View File

@ -0,0 +1,41 @@
# Standard standalone server configuration.
START {
# Do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# This is only necessary if using idled for IMAP IDLE.
#idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/imap/socket.
SERVICES {
# Add or remove based on preferences.
imap cmd="imapd" listen="imap2" prefork=0
pop3 cmd="pop3d" listen="pop-3" prefork=0
# Don't forget to generate the needed keys for SSL or TLS
# (see doc/html/install-configure.html).
#imaps cmd="imapd -s" listen="imaps" prefork=0
#pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
# at least one LMTP is required for delivery
#lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
# this is only necessary if using notifications
#notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
}
EVENTS {
# This is required.
checkpoint cmd="ctl_cyrusdb -c" period=30
# This is only necessary if using duplicate delivery suppression.
delprune cmd="ctl_deliver -E 3" period=1440
# This is only necessary if caching TLS sessions.
tlsprune cmd="tls_prune" period=1440
}

View File

@ -0,0 +1,5 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Additional options for the cyrus master
CYRUS_OPTS=""

View File

@ -0,0 +1,6 @@
#%PAM-1.0
auth required pam_nologin.so
auth include system-auth
account include system-auth

View File

@ -0,0 +1,22 @@
#!/sbin/openrc-run
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use net
use dns logger
after drac saslauthd
}
start() {
ebegin "Starting cyrus imapd"
start-stop-daemon --start --quiet --background \
--exec /usr/lib/cyrus/master -- ${CYRUS_OPTS}
eend $?
}
stop() {
ebegin "Stopping cyrus imapd"
start-stop-daemon --stop --quiet --pidfile /var/run/cyrus-master.pid
eend $?
}

View File

@ -0,0 +1,50 @@
# Don't forget to use chattr +S (if you are using ext[23])
# when you change these directories (read the docs).
configdirectory: /var/imap
partition-default: /var/spool/imap
sievedir: /var/imap/sieve
tls_ca_path: /etc/ssl/certs
tls_cert_file: /etc/ssl/cyrus/server.crt
tls_key_file: /etc/ssl/cyrus/server.key
# Don't use an everyday user as admin.
admins: cyrus
hashimapspool: yes
allowanonymouslogin: no
allowplaintext: no
# Allow renaming of top-level mailboxes.
#allowusermoves: yes
# Use this if sieve-scripts could be in ~user/.sieve.
#sieveusehomedir: yes
# Use saslauthd if you want to use pam for imap.
# But be warned: login with DIGEST-MD5 or CRAM-MD5
# is not possible using pam.
#sasl_pwcheck_method: saslauthd
####################################################
## This is a recommended authentication method if you
## emerge cyrus-sasl with 'postgres' or 'mysql'
## To use with mysql database uncomment those lines below.
#sasl_pwcheck_method: auxprop
#sasl_auxprop_plugin: sql
## possible values for sasl_auxprop_plugin 'mysql', 'pgsql', 'sqlite'.
#sasl_sql_engine: mysql
## all possible values.
#sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM
## or limit to CRAM-MD5 only
#sasl_mech_list: CRAM-MD5
## change below to suit your setup.
sasl_sql_user: mailsqluser
sasl_sql_passwd: password
sasl_sql_database: mailsqldb
sasl_sql_hostnames: localhost
sasl_sql_select: SELECT clear FROM users WHERE email = '%u@%r'