diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-mail/cyrus-imapd |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-mail/cyrus-imapd')
20 files changed, 1718 insertions, 0 deletions
diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest new file mode 100644 index 000000000000..547efbb6d70f --- /dev/null +++ b/net-mail/cyrus-imapd/Manifest @@ -0,0 +1,25 @@ +AUX cyrus-imapd-db.patch 2193 SHA256 b2b7520f59f109823db38a477aa2c953ce234cdb5fc17c19212ddc4d8c73290b SHA512 a756552c0f1dd548661b4402e170474977484f3a4b32e765f8648d02109dc131d313e924b07bb3ad704f34cab4aef079b206b6d1e8d97911657886bd2476910c WHIRLPOOL ac917da63126934a6e7e225cd35dcecc45d82e922b63a114e4f835753be9fbaac767bad03e1a1b2507ce91747d074bc2723869c117d66a07d99aeaaa47f5088d +AUX cyrus-imapd-fix-tests.patch 471 SHA256 b752382470c5bcc475d02c5d7b9985c0d98614d2cc64e190b71543df2b769316 SHA512 ab967c8f493d902510f25268d3d63c3c60246cfd2661ae3a19e5a89cd238028ac3eac4369736b51fc2a0c27407958963ffb1e6f8ba19b5d19b53a680d3737fa0 WHIRLPOOL 3158d81e3ffde9913ec3b39778bd640e29d03cc9dd431632bfd24896564ee6a19a62fcce90627e3ac56ccbe15684e822a3f5b85cc48e2365f5babbd63928306b +AUX cyrus-imapd-libcap-libs.patch 2251 SHA256 580fb014096a8f46f1e897cc8030c7574ed44a745b2b32df5bd3c99895d6b9b1 SHA512 c8f6676549f1e4e91be40da22a3061ae9b660d159c0d64e4848f0550214c190e7d1357dce20ba181ea2d8425e21552ce44faa04213b862740da62bf3f2f09b14 WHIRLPOOL 9caacf9eb91a2840fe983dcb76110c37d494e0a8d9f6ea2d97e1b2f7b95406b374fb593f4c945e870bf2b510f7546a28d18a6c1aadf6bad50832cb9ab6a45f77 +AUX cyrus-imapd-sieve-libs-v4.patch 5751 SHA256 2f4d89d26ae75ef8390933a5575cef29e1927b7cc7f2e6c9f0a0952563e38e72 SHA512 cd9f5c23f79720d768b3b8a089b3f5c078825465b3b0f28b7b629bc07415598f9195218e35bb7bebaca3499bdfdd30a137ea6a3a455a84386e9d02de41abba51 WHIRLPOOL e2fdc778dbdada3b3b24cee57db541f6d1ec27055d5c814686649d2d9e000ffc22a60da321deca27693ae0404f48c79e649101273bf598889b56f93590a8dd82 +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 cyrus.rc7 459 SHA256 65de418dd52857ebbb09a4dfd6d90a8fdb6462aaafc791f5d16b8ba642a9efcf SHA512 acd561be944aa5ebfe4f89f19552b61416ee2355f37cf2c3d6e44294d7079e382a3e4ba2ce606842c283ce8c02cdc8c6dbbd4b08758d8e99f74fe8a258b89ca3 WHIRLPOOL e27828dea19af48907d6025f09b8afa64bf3d5792f5ff3d8c9bbe2c0354153da4375a78e5753ec2ab0f015640b805fcd36bac759ee397d40dc9980d355e7b4db +AUX cyrus.rc8 699 SHA256 ab569f694e6c49e2c996d8f984e85bde22e202ad1321bee88eeec1b738640aba SHA512 9340877dd83cd4d5770c12a7f107ee697b42736a57cf304695f03f9f673c5c53b4477f20832ee4815515b2e33e8b33335b298cf5dd48015a6a581b8ab4f4f240 WHIRLPOOL 79a5377f949d8b100a3806a31e4170ed612784f1679a04c8a4a551c71b1d60c40d1b77696df0e01ca1b114d7e98a300d84a1ec385525f5befcea7d1c785aedf7 +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 +DIST cyrus-imapd-3.0.3.tar.gz 10819454 SHA256 6a76d8d00b26a2c9d03c65197724a28ab6d044527d7e230e6331f8de79af889a SHA512 0b5c3167d80d91371e3f07e64b8bc8c085481946e6536dd407976f6f8ae66405fd1f6d2ff5ad51e5e0eb827a64d90d93daf72d5a1afa409782a287bec29665df WHIRLPOOL 6d543b09d3f18d10c481133fafb78f82a6e2d0dd3fb7c4cdb1d181d906acef7db4c6da5dcc86254a836f69fc7cbd54034f889b0808da060a083f35dd8ee40434 +DIST cyrus-imapd-3.0.4.tar.gz 10819487 SHA256 ed17b4321bbe54df2c9b8832e189f52de4561f51e199f7c620216e79910c73a0 SHA512 9ceb7ac837c932c70fa0c1583bf8700b3ec27568d72538ae8d59f2f551e3007b3c2fc68fd29c009597c3949345dbe1bf2eb614bea038d70a5b49e5507df6b69a WHIRLPOOL a67a9d033ddb601608590f085f513a6f8b220cf5a0df786c68dcb642bb9f72018ca220ce8abdc57221aac81c60e3bddee7c8dd3ad8b1fb61ead8d653400f8b51 +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 +EBUILD cyrus-imapd-3.0.3-r1.ebuild 5754 SHA256 652447ca47a913dd53d20ed976f630351d86e69104dc11afa01c7125a2a1b0c2 SHA512 d345ee957cbeca761b6bc6f60fa4c010e2887f73a08cec49c16fb7082450258d3d900856e6773ba9ffa7fdba5ddf061616adc626c61b44e6f98b1dea8c218a1b WHIRLPOOL 87519e916aab206173862f4c55e59a1d2b23cc0a7d38b9ad341da236a0be17115297b9d013310fb7effa173279f2f3ab4aac10a20d6992f867e78e2f8a04b12a +EBUILD cyrus-imapd-3.0.3.ebuild 5702 SHA256 e47b9be010571ac5f464486dfd1f84ef1afeb57ea35a0f9ee87251f3c185d5c0 SHA512 35aaa7a6d27ac8186fde64371b9866cd1683e923d31a04cf2a11207955e0b92a181fba5a2707ccf8e4dd3906a7041046c9254fd09b18e6f110a58416e98cdecb WHIRLPOOL e5a165c709ceb05acb009db4ce7bab6277efde3dcfa5b2668d0e052e6fec7fb2a881f8b7c8b6a70be443936795638b8c10a896aa8e7f2d64ea9a4f80412c9060 +EBUILD cyrus-imapd-3.0.4.ebuild 5901 SHA256 266a142ed7cf94cd2833c4ae6cb2c32d29f7ec4bb10d550c5a9c0fa54da5c3a5 SHA512 8c55945b34ce08e5f333bafb04a60d9bc2b112c3c0374a98ad989c0b641b4f1efeb464f2453b040666a0cd5643f4dabc7e0a1cf0802b21c32021eec59e54ed5d WHIRLPOOL 15863a548ffd0d0acd70d15757ea647494c67b04d844dbf394a413b4dae5d27c0f9c2b92fcb65a9caf08f8a11943791995425608de8c26d6f325c0679ab2d1b9 +MISC ChangeLog 4804 SHA256 d41f017230fe0f2251e7c5f25cbcb6bacde54806993d247f4efb5707312f7298 SHA512 f9109b2a23461c41b418476e2ce4c9a0bee7ee5572213406ffe74c4d1733f207bc8971cd6dac4fd77a762cbc294f5bf84d7ee8031acb39ad799f46b48e925213 WHIRLPOOL dfe3c74426eb843f9cb6b47c37702c2050769434c2e805beb793389d7081c37e69f02ed08389b8906823da724e075ffc4c300a5e0d542d3d328e560b7888f037 +MISC ChangeLog-2015 39151 SHA256 c2bd8f1276a9e00cef3d08c00d5f78aa34a4732c654c3f126ac3d126f804244d SHA512 253f158b336687ed21cdc0507c03bde6e440dc6ea0080d80ca6dd883c279db4f72b9e25f69ceed7c9300011a7705d040c64d2d8445bf45bcaf3e53c1afc08458 WHIRLPOOL ce61597c095271d0d4d613c89b734ac5f12c1f8f04a535cc9bb0e6cc7b5928c5ebc9c69c6f80b0badec8846109ab31f47f4276ecbf47a95167f361c5d1d675bb +MISC metadata.xml 871 SHA256 2534843965cc06933180f661fe8126b607696e39f1c77112446ae262a5c7fe16 SHA512 25449c1218dfad7b692b37b799a659b6a10e0e31bb003fbed27b3b43ce3610f9ee5f17a995cf9244d5027ad84889a8e79a774f63101bb6ea35054ce9dbb1fe20 WHIRLPOOL 506cdb8d91ee25f145e2cb784612a5fada49974bc6e674ea5068ef1d3a445a747f44b60b59f693f6aeae609f683cfd643498fd6c36973436901217fc6b6ed3ad diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.5.10.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.5.10.ebuild new file mode 100644 index 000000000000..7d18d33ec917 --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-2.5.10.ebuild @@ -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 +} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild new file mode 100644 index 000000000000..cbe960377731 --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild @@ -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 +} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.5.11.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11.ebuild new file mode 100644 index 000000000000..5ed4f1309661 --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11.ebuild @@ -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 +} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.0.3-r1.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.0.3-r1.ebuild new file mode 100644 index 000000000000..6743077fa02e --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.0.3-r1.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools pam ssl-cert user + +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 backup calalarm caps clamav http jmap kerberos ldap lmdb \ + mysql nntp pam perl postgres replication +server sieve snmp \ + sphinx sqlite ssl static-libs tcpd test xapian" + +# virtual/mysql-5.5 added for the --variable= option below +CDEPEND="sys-libs/zlib + dev-libs/libpcre + >=dev-libs/cyrus-sasl-2.1.13 + dev-libs/jansson + dev-libs/icu:= + afs? ( net-fs/openafs ) + caps? ( sys-libs/libcap ) + clamav? ( app-antivirus/clamav ) + http? ( dev-libs/libxml2 dev-libs/libical ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lmdb? ( dev-db/lmdb ) + 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 ) + ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] ) + sqlite? ( dev-db/sqlite:3 ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) ) + xapian? ( >=dev-libs/xapian-1.4.0 )" + +DEPEND="${CDEPEND} + test? ( dev-util/cunit )" + +# all blockers really needed? +RDEPEND="${CDEPEND} + !mail-mta/courier + !net-mail/bincimap + !net-mail/courier-imap + !net-mail/uw-imap + !net-mail/cyrus-imap-admin" + +REQUIRED_USE="afs? ( kerberos ) + backup? ( sqlite ) + calalarm? ( http ) + http? ( sqlite ) + jmap? ( http xapian ) + sphinx? ( mysql )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewuser cyrus -1 -1 /usr/cyrus mail +} + +src_prepare() { + # bug 604470 + eapply -p1 "${FILESDIR}/${PN}-sieve-libs-v4.patch" + eapply -p1 "${FILESDIR}/${PN}-libcap-libs.patch" + eapply -p1 "${FILESDIR}/${PN}-fix-tests.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-unit-tests \ + --enable-murder \ + --enable-idled \ + --enable-event-notification \ + --enable-autocreate \ + --enable-pcre \ + --with-cyrus-user=cyrus \ + --with-cyrus-group=mail \ + --with-com_err=yes \ + --with-sasl \ + --without-krb \ + --without-krbdes \ + --enable-squat \ + --with-zlib \ + $(use_enable afs) \ + $(use_enable afs krb5afspts) \ + $(use_enable backup) \ + $(use_enable calalarm calalarmd) \ + $(use_with caps libcap) \ + $(use_with clamav) \ + $(use_enable jmap) \ + $(use_enable nntp) \ + $(use_enable http) \ + $(use_enable replication) \ + $(use_enable kerberos gssapi) \ + $(use_with ldap) \ + $(use_with lmdb) \ + $(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 sphinx) \ + $(use_enable static-libs static) \ + $(use_with tcpd libwrap) \ + $(use_enable xapian) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install + + dodoc README* + dodoc -r doc + cp -r contrib tools "${D}/usr/share/doc/${PF}" + rm -f doc/text/Makefile* + + mv "${D}"usr/libexec/{master,cyrusmaster} || die + + insinto /etc + newins "${D}usr/share/doc/${PF}/doc/examples/cyrus_conf/normal.conf" cyrus.conf + newins "${D}usr/share/doc/${PF}/doc/examples/imapd_conf/normal.conf" imapd.conf + + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \ + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \ + -e '/^sievedir/s|/var/.*|/var//imap/sieve|' \ + "${D}"etc/imapd.conf + + # turn off sieve if not installed + if ! use sieve; then + sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + # same thing for http(s) as well + if ! use http; then + sed -i -e "/http/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + + newinitd "${FILESDIR}/cyrus.rc7" 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 + + echo + ewarn "Please see http://www.cyrusimap.org/imap/download/upgrade.html" + ewarn "for upgrade instructions." + echo +} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.0.3.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.0.3.ebuild new file mode 100644 index 000000000000..f4638e0cc79e --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.0.3.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools pam ssl-cert user + +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 backup calalarm caps clamav http jmap kerberos ldap lmdb \ + mysql nntp pam perl postgres replication +server sieve snmp \ + sphinx sqlite ssl static-libs tcpd test xapian" + +# virtual/mysql-5.5 added for the --variable= option below +CDEPEND="sys-libs/zlib + dev-libs/libpcre + >=dev-libs/cyrus-sasl-2.1.13 + dev-libs/jansson + dev-libs/icu:= + afs? ( net-fs/openafs ) + caps? ( sys-libs/libcap ) + clamav? ( app-antivirus/clamav ) + http? ( dev-libs/libxml2 dev-libs/libical ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lmdb? ( dev-db/lmdb ) + 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 ) + ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] ) + sqlite? ( dev-db/sqlite:3 ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) ) + xapian? ( >=dev-libs/xapian-1.4.0 )" + +DEPEND="${CDEPEND} + test? ( dev-util/cunit )" + +# all blockers really needed? +RDEPEND="${CDEPEND} + !mail-mta/courier + !net-mail/bincimap + !net-mail/courier-imap + !net-mail/uw-imap + !net-mail/cyrus-imap-admin" + +REQUIRED_USE="afs? ( kerberos ) + backup? ( sqlite ) + calalarm? ( http ) + http? ( sqlite ) + jmap? ( http xapian ) + sphinx? ( mysql )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewuser cyrus -1 -1 /usr/cyrus mail +} + +src_prepare() { + # bug 604470 + eapply -p1 "${FILESDIR}/${PN}-sieve-libs-v4.patch" + eapply -p1 "${FILESDIR}/${PN}-fix-tests.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-unit-tests \ + --enable-murder \ + --enable-idled \ + --enable-event-notification \ + --enable-autocreate \ + --enable-pcre \ + --with-cyrus-user=cyrus \ + --with-cyrus-group=mail \ + --with-com_err=yes \ + --with-sasl \ + --without-krb \ + --without-krbdes \ + --enable-squat \ + --with-zlib \ + $(use_enable afs) \ + $(use_enable afs krb5afspts) \ + $(use_enable backup) \ + $(use_enable calalarm calalarmd) \ + $(use_with caps libcap) \ + $(use_with clamav) \ + $(use_enable jmap) \ + $(use_enable nntp) \ + $(use_enable http) \ + $(use_enable replication) \ + $(use_enable kerberos gssapi) \ + $(use_with ldap) \ + $(use_with lmdb) \ + $(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 sphinx) \ + $(use_enable static-libs static) \ + $(use_with tcpd libwrap) \ + $(use_enable xapian) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install + + dodoc README* + dodoc -r doc + cp -r contrib tools "${D}/usr/share/doc/${PF}" + rm -f doc/text/Makefile* + + mv "${D}"usr/libexec/{master,cyrusmaster} || die + + insinto /etc + newins "${D}usr/share/doc/${P}/doc/examples/cyrus_conf/normal.conf" cyrus.conf + newins "${D}usr/share/doc/${P}/doc/examples/imapd_conf/normal.conf" imapd.conf + + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \ + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \ + -e '/^sievedir/s|/var/.*|/var//imap/sieve|' \ + "${D}"etc/imapd.conf + + # turn off sieve if not installed + if ! use sieve; then + sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + # same thing for http(s) as well + if ! use http; then + sed -i -e "/http/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + + newinitd "${FILESDIR}/cyrus.rc7" 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 + + echo + ewarn "Please see http://www.cyrusimap.org/imap/download/upgrade.html" + ewarn "for upgrade instructions." + echo +} diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.0.4.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.0.4.ebuild new file mode 100644 index 000000000000..9b55bcb7b8f7 --- /dev/null +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.0.4.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools pam ssl-cert user + +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 backup calalarm caps clamav http jmap kerberos ldap lmdb \ + mysql nntp pam perl postgres replication +server sieve snmp \ + sphinx sqlite ssl static-libs tcpd test xapian" + +# virtual/mysql-5.5 added for the --variable= option below +CDEPEND="sys-libs/zlib + dev-libs/libpcre + >=dev-libs/cyrus-sasl-2.1.13 + dev-libs/jansson + dev-libs/icu:= + afs? ( net-fs/openafs ) + caps? ( sys-libs/libcap ) + clamav? ( app-antivirus/clamav ) + http? ( dev-libs/libxml2 dev-libs/libical ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lmdb? ( dev-db/lmdb ) + 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 ) + ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] ) + sqlite? ( dev-db/sqlite:3 ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) ) + xapian? ( >=dev-libs/xapian-1.4.0 )" + +DEPEND="${CDEPEND} + test? ( dev-util/cunit )" + +# all blockers really needed? +RDEPEND="${CDEPEND} + !mail-mta/courier + !net-mail/bincimap + !net-mail/courier-imap + !net-mail/uw-imap + !net-mail/cyrus-imap-admin" + +REQUIRED_USE="afs? ( kerberos ) + backup? ( sqlite ) + calalarm? ( http ) + http? ( sqlite ) + jmap? ( http xapian ) + sphinx? ( mysql )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewuser cyrus -1 -1 /usr/cyrus mail +} + +src_prepare() { + # bug 604470 + eapply -p1 "${FILESDIR}/${PN}-sieve-libs-v4.patch" + eapply -p1 "${FILESDIR}/${PN}-libcap-libs.patch" + eapply -p1 "${FILESDIR}/${PN}-fix-tests.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-unit-tests \ + --enable-murder \ + --enable-idled \ + --enable-event-notification \ + --enable-autocreate \ + --enable-pcre \ + --with-cyrus-user=cyrus \ + --with-cyrus-group=mail \ + --with-com_err=yes \ + --with-sasl \ + --without-krb \ + --without-krbdes \ + --enable-squat \ + --with-zlib \ + $(use_enable afs) \ + $(use_enable afs krb5afspts) \ + $(use_enable backup) \ + $(use_enable calalarm calalarmd) \ + $(use_with caps libcap) \ + $(use_with clamav) \ + $(use_enable jmap) \ + $(use_enable nntp) \ + $(use_enable http) \ + $(use_enable replication) \ + $(use_enable kerberos gssapi) \ + $(use_with ldap) \ + $(use_with lmdb) \ + $(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 sphinx) \ + $(use_enable static-libs static) \ + $(use_with tcpd libwrap) \ + $(use_enable xapian) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install + + dodoc README* + dodoc -r doc + cp -r contrib tools "${D}/usr/share/doc/${PF}" + rm -f doc/text/Makefile* + + mv "${D}"usr/libexec/{master,cyrusmaster} || die + + insinto /etc + newins "${D}usr/share/doc/${PF}/doc/examples/cyrus_conf/normal.conf" cyrus.conf + newins "${D}usr/share/doc/${PF}/doc/examples/imapd_conf/normal.conf" imapd.conf + + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \ + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \ + -e '/^sievedir/s|/var/.*|/var/imap/sieve|' \ + "${D}"etc/imapd.conf + + sed -i -e 's|/var/imap/socket/lmtp|/run/cyrus/socket/lmtp|' \ + -e 's|/var/imap/socket/notify|/run/cyrus/socket/notify|' \ + "${D}"etc/cyrus.conf + + # turn off sieve if not installed + if ! use sieve; then + sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + # same thing for http(s) as well + if ! use http; then + sed -i -e "/http/s/^/#/" "${D}/etc/cyrus.conf" || die + fi + + newinitd "${FILESDIR}/cyrus.rc8" 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 + + echo + ewarn "Please see http://www.cyrusimap.org/imap/download/upgrade.html" + ewarn "for upgrade instructions." + echo +} diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch new file mode 100644 index 000000000000..f720cf2cb127 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch @@ -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 diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-fix-tests.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-fix-tests.patch new file mode 100644 index 000000000000..c32f2065db00 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-fix-tests.patch @@ -0,0 +1,21 @@ +--- a/Makefile.am 2017-05-16 15:48:55.943709210 +0300 ++++ b/Makefile.am 2017-05-16 15:50:20.950184710 +0300 +@@ -635,7 +635,6 @@ + cunit/guid.testc \ + cunit/hash.testc \ + cunit/imapurl.testc \ +- cunit/jmapauth.testc \ + cunit/libconfig.testc \ + cunit/mboxname.testc \ + cunit/md5.testc \ +@@ -654,6 +653,10 @@ + cunit_TESTS += cunit/sieve.testc + endif + ++if JMAP ++cunit_TESTS += cunit/jmapauth.testc ++endif ++ + cunit_TESTS += \ + cunit/spool.testc \ + cunit/squat.testc \ diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs.patch new file mode 100644 index 000000000000..e1f5332c6e83 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs.patch @@ -0,0 +1,35 @@ +--- a/configure.ac 2017-07-15 07:26:38.375295969 +0200 ++++ b/configure.ac 2017-07-15 07:28:33.250194410 +0200 +@@ -1351,7 +1351,9 @@ + AC_CHECK_HEADERS([sys/capability.h sys/prctl.h], , have_libcap=no) + if test "$have_libcap" = "yes"; then + AC_DEFINE(HAVE_LIBCAP, [], [Do we have libcap system capabilities handling (Linux systems only)?]) +- LIBS="$LIBS -lcap" ++ LIBCAP="-lcap" ++ AC_SUBST(LIBCAP) ++ LIBS="$LIBS $LIBCAP" + fi + fi + ;; +--- a/perl/imap/Makefile.PL.in 2017-07-15 07:28:49.886034889 +0200 ++++ b/perl/imap/Makefile.PL.in 2017-07-15 07:29:10.621836046 +0200 +@@ -90,7 +90,7 @@ + 'clean' => {'FILES' => 'libcyrperl.a cyradm'}, + 'OBJECT' => 'IMAP.o', + 'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', +- 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], ++ 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@ @LIBCAP@"], + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' + '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 2017-07-15 07:29:29.433655659 +0200 ++++ b/perl/sieve/managesieve/Makefile.PL.in 2017-07-15 07:29:44.593510288 +0200 +@@ -69,7 +69,7 @@ + 'ABSTRACT' => 'Cyrus Sieve management interface', + 'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION + 'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', +- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], ++ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@ @LIBCAP@"], + 'CCFLAGS' => '@GCOV_CFLAGS@', + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' + 'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@", diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs-v4.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs-v4.patch new file mode 100644 index 000000000000..4a7bac2e3c1f --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs-v4.patch @@ -0,0 +1,127 @@ +--- a/configure.ac 2017-04-20 04:21:48.000000000 +0300 ++++ b/configure.ac 2017-05-16 10:30:37.337965921 +0300 +@@ -666,7 +666,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 +@@ -1938,6 +1940,7 @@ + fi + + LIBS="${LIBS} ${SQLITE_LIBADD}" ++ AC_SUBST(SQLITE_LIBADD) + CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}" + AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?]) + else +--- a/perl/imap/Makefile.PL.in 2017-04-07 08:31:10.000000000 +0300 ++++ b/perl/imap/Makefile.PL.in 2017-05-16 10:26:08.193965921 +0300 +@@ -90,7 +90,7 @@ + 'clean' => {'FILES' => 'libcyrperl.a cyradm'}, + 'OBJECT' => 'IMAP.o', + 'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', +- 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@"], ++ 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' + '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 2017-04-07 08:31:10.000000000 +0300 ++++ b/perl/sieve/managesieve/Makefile.PL.in 2017-05-16 10:26:31.048965921 +0300 +@@ -69,7 +69,7 @@ + 'ABSTRACT' => 'Cyrus Sieve management interface', + 'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION + 'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', +- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@"], ++ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], + 'CCFLAGS' => '@GCOV_CFLAGS@', + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' + 'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@", +--- a/configure.ac 2017-05-16 15:18:23.648756211 +0300 ++++ b/configure.ac 2017-05-16 15:26:49.241756211 +0300 +@@ -633,8 +633,6 @@ + + AC_ARG_ENABLE(sieve, + [AS_HELP_STRING([--disable-sieve], [disable Sieve support])],,[enable_sieve="yes";]) +-AC_ARG_ENABLE(pcre, +- [AS_HELP_STRING([--disable-pcre], [disable PCRE library])]) + + if test "$enable_sieve" != "no"; then + AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?]) +@@ -650,42 +648,46 @@ + if test -z "$ac_cv_prog_LEX"; then + AC_MSG_ERROR([Sieve requires flex/lex, but none is installed]) + fi ++fi ++AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"]) ++ + +- if test "$enable_pcre" != "no"; then +- AC_CHECK_HEADER(pcreposix.h) +- if test "$ac_cv_header_pcreposix_h" = "yes"; then +- AC_MSG_CHECKING(for utf8 enabled pcre) +- AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h> ++AC_ARG_ENABLE(pcre, ++ [AS_HELP_STRING([--disable-pcre], [disable PCRE library])]) ++ ++if test "$enable_pcre" != "no"; then ++ AC_CHECK_HEADER(pcreposix.h) ++ if test "$ac_cv_header_pcreposix_h" = "yes"; then ++ AC_MSG_CHECKING(for utf8 enabled pcre) ++ AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h> + #ifndef REG_UTF8 + #include </nonexistent> + #endif],cyrus_cv_pcre_utf8=yes,cyrus_cv_pcre_utf8=no)) +- AC_MSG_RESULT($cyrus_cv_pcre_utf8) +- else +- cyrus_cv_pcre_utf8="no" +- fi ++ AC_MSG_RESULT($cyrus_cv_pcre_utf8) ++ else ++ cyrus_cv_pcre_utf8="no" + fi ++fi + +- if test "$cyrus_cv_pcre_utf8" = "yes"; then +- 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?]) ++if test "$cyrus_cv_pcre_utf8" = "yes"; then ++ 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 ++ AC_CHECK_HEADERS(rxposix.h) ++ if test "$ac_cv_header_rxposix_h" = "yes"; then ++ LIBS="$LIBS -lrx" ++ AC_DEFINE(ENABLE_REGEX, [], ++ [Do we have a regex library?]) + else +- AC_CHECK_HEADERS(rxposix.h) +- if test "$ac_cv_header_rxposix_h" = "yes"; then +- LIBS="$LIBS -lrx" +- AC_DEFINE(ENABLE_REGEX, [], +- [Do we have a regex library?]) +- else +- AC_SEARCH_LIBS(regcomp, regex, +- AC_DEFINE(ENABLE_REGEX, [], +- [Do we have a regex library?]), []) +- fi ++ AC_SEARCH_LIBS(regcomp, regex, ++ AC_DEFINE(ENABLE_REGEX, [], ++ [Do we have a regex library?]), []) + fi + fi + +-AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"]) + + dnl look for an option to disable sign-comparison warnings (needed for + dnl flex-generated sieve sources when building with -Werror) diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch new file mode 100644 index 000000000000..0bfdc1d31550 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch @@ -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@", diff --git a/net-mail/cyrus-imapd/files/cyrus.conf b/net-mail/cyrus-imapd/files/cyrus.conf new file mode 100644 index 000000000000..ab084d51a024 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.conf @@ -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 +} diff --git a/net-mail/cyrus-imapd/files/cyrus.confd b/net-mail/cyrus-imapd/files/cyrus.confd new file mode 100644 index 000000000000..b11c6780bdc4 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.confd @@ -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="" diff --git a/net-mail/cyrus-imapd/files/cyrus.pam-include b/net-mail/cyrus-imapd/files/cyrus.pam-include new file mode 100644 index 000000000000..6e47645bd7d6 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.pam-include @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth required pam_nologin.so +auth include system-auth + +account include system-auth diff --git a/net-mail/cyrus-imapd/files/cyrus.rc6 b/net-mail/cyrus-imapd/files/cyrus.rc6 new file mode 100644 index 000000000000..119de24c188c --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.rc6 @@ -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 $? +} diff --git a/net-mail/cyrus-imapd/files/cyrus.rc7 b/net-mail/cyrus-imapd/files/cyrus.rc7 new file mode 100644 index 000000000000..348b01c04921 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.rc7 @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 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/libexec/cyrusmaster -- ${CYRUS_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cyrus imapd" + start-stop-daemon --stop --quiet --pidfile /run/cyrus-master.pid + eend $? +} diff --git a/net-mail/cyrus-imapd/files/cyrus.rc8 b/net-mail/cyrus-imapd/files/cyrus.rc8 new file mode 100644 index 000000000000..9d9e9452f565 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus.rc8 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net + use dns logger + after drac saslauthd +} + +checkdirs() { + for dir in /run/cyrus/{,proc,lock,socket,sync} + do + checkpath -q -d -o cyrus:mail -m 0750 "${dir}" || { + eerror "Failed to create directory at $dir" + return 1 + } + done +} + + +start() { + checkdirs || return 1 + ebegin "Starting cyrus imapd" + start-stop-daemon --start --quiet --background \ + --exec /usr/libexec/cyrusmaster -- ${CYRUS_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cyrus imapd" + start-stop-daemon --stop --quiet --pidfile /run/cyrus-master.pid + eend $? +} diff --git a/net-mail/cyrus-imapd/files/imapd.conf b/net-mail/cyrus-imapd/files/imapd.conf new file mode 100644 index 000000000000..e77ff2f4b887 --- /dev/null +++ b/net-mail/cyrus-imapd/files/imapd.conf @@ -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' diff --git a/net-mail/cyrus-imapd/metadata.xml b/net-mail/cyrus-imapd/metadata.xml new file mode 100644 index 000000000000..23dc96dc53ab --- /dev/null +++ b/net-mail/cyrus-imapd/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>net-mail@gentoo.org</email> + <name>Net-Mail</name> + </maintainer> + <use> + <flag name="replication">Enable replication support</flag> + <flag name="sieve">Enable sieve support</flag> + <flag name="http">Enable http support</flag> + <flag name="server">Enable building server binaries</flag> + <flag name="backup">Enable backup service support</flag> + <flag name="calalarm">Enable CalDAV alarm support</flag> + <flag name="jmap">Enable JMAP support</flag> + <flag name="sphinx">Enable Sphinx search engine support</flag> + <flag name="xapian">Enable Xapian search engine support</flag> + <flag name="lmdb">Enable support for using <pkg>dev-db/lmdb</pkg></flag> + </use> +</pkgmetadata> |