From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-mail/uw-imap/Manifest | 13 ++ .../uw-imap/files/uw-imap-2004c-amd64-so-fix.patch | 13 ++ net-mail/uw-imap/files/uw-imap-ldflags.patch | 52 +++++++ net-mail/uw-imap/files/uw-imap.xinetd | 14 ++ net-mail/uw-imap/files/uw-imaps.xinetd | 15 ++ net-mail/uw-imap/files/uw-ipop2.xinetd | 15 ++ net-mail/uw-imap/files/uw-ipop3.xinetd | 14 ++ net-mail/uw-imap/files/uw-ipop3s.xinetd | 14 ++ net-mail/uw-imap/metadata.xml | 11 ++ net-mail/uw-imap/uw-imap-2007f-r1.ebuild | 161 +++++++++++++++++++++ net-mail/uw-imap/uw-imap-2007f.ebuild | 157 ++++++++++++++++++++ 11 files changed, 479 insertions(+) create mode 100644 net-mail/uw-imap/Manifest create mode 100644 net-mail/uw-imap/files/uw-imap-2004c-amd64-so-fix.patch create mode 100644 net-mail/uw-imap/files/uw-imap-ldflags.patch create mode 100644 net-mail/uw-imap/files/uw-imap.xinetd create mode 100644 net-mail/uw-imap/files/uw-imaps.xinetd create mode 100644 net-mail/uw-imap/files/uw-ipop2.xinetd create mode 100644 net-mail/uw-imap/files/uw-ipop3.xinetd create mode 100644 net-mail/uw-imap/files/uw-ipop3s.xinetd create mode 100644 net-mail/uw-imap/metadata.xml create mode 100644 net-mail/uw-imap/uw-imap-2007f-r1.ebuild create mode 100644 net-mail/uw-imap/uw-imap-2007f.ebuild (limited to 'net-mail/uw-imap') diff --git a/net-mail/uw-imap/Manifest b/net-mail/uw-imap/Manifest new file mode 100644 index 000000000000..86e718a05ced --- /dev/null +++ b/net-mail/uw-imap/Manifest @@ -0,0 +1,13 @@ +AUX uw-imap-2004c-amd64-so-fix.patch 675 SHA256 8f80dff390a5d87afd71ab07bbff0eed00acb14b3bfa2355f33ba22e833af202 SHA512 7275a7597e346e99e7d4f94423cdc4cfb947a5a93e6e29de8f15ede933dcdcb9a2e951f05e486d93a147bc5def842a089a94e2a9c63b4e841c92c39e7560b37b WHIRLPOOL 4a45bbe60939a8381449be38f4bf641c893522a5cdb24ea11ab87e5d448db4763b0c223f803eea90e083f8d13cf8b25678009bef8cc7b87037c7e223837cd0df +AUX uw-imap-ldflags.patch 1643 SHA256 344eb67975420a661082fee770c4faf48e57ac29c7d95f3caf4f69223c979791 SHA512 ae3739fe3574a5decf15ce35f51818c8707aa883688ac584ebaa9ba7073c8f0ff606e9a948ecb71a95b98ffb8b644be133f01b3aaeb1a1aefa67085741f2b405 WHIRLPOOL 9690a6c27c797e1b0f29c263a77313b1c013b9574103e11c94f80a67584ab4962a5af913817805242d427ce42d2fb3c1edb8cf8da0669da7e38bdfefeb732dc7 +AUX uw-imap.xinetd 377 SHA256 167f3c29cdaab2dbf32a5cb6a8eee6d19639d97e714a60615be9791ef190ea4d SHA512 7575337158ba49788325bf304be1fe0be08dac37258c51cabf7106d2d935a4ca00a6218f22a44cae40c2da01aa5525552d5707e876ffd771e328c57d4e82d447 WHIRLPOOL 56ffa2a51228cdfc420cc97d6bfc9988a0675c318822d5c5364f45f37806706fb28a9e67792c66946758ec47bee1eb1eaf48fd84eff7d680813ab1540afb6678 +AUX uw-imaps.xinetd 371 SHA256 d5111e90ded1b97ee3006ff9283ce5af8dce4c74184e27274c9a2c2c57383111 SHA512 5962875a4a254a852582f3a71b7eb2861589a1d4592da8cefff0e945000ecd035a843c735a652adb647fc02aba93ffda6d6e3fadf7c69aefd86e440100301e58 WHIRLPOOL c15f208830c6e3fa4de906e36d268f9d4951ae27c0d53533553c7f6f2d8525f98f8bf6ed34daed2a902ebbf2cdfae03d847bad8d712c04f921717900ac8c6a07 +AUX uw-ipop2.xinetd 448 SHA256 9820e2ad08fa15d70c98f08c22e90d2f26735edf844de1fb50e5737937c26499 SHA512 f840d5e7ab234a5dbe3eedd2078aca0063324eba4257479fb8659497f91e3aec09e5394f057c904b380394f4987a065cb9e9206c613bb6cabf6d78474548b230 WHIRLPOOL 2c94931019d403ae5a56ca9875acb45165832766d855588bc1e454e21c5e084648bbb33d7bac566491d01be0408ae6bc4bc0469df5c5f96ec879fd3f55abd6e6 +AUX uw-ipop3.xinetd 357 SHA256 405b79e3343e5f7fad2debd4c8144ca7d0d4e7abadcebb9191691acb833268c3 SHA512 ccaaf4b6972ebcce8ece756562e51b1a0c752c50378930abb807ba878842d1afa8d88fecc091ee0f228149abdd3426fafa06bc882c3d684e44dabc4d0d32e347 WHIRLPOOL 937f77538de981ef824ced1b14d2760f56bb75cb8a3c533b924377cfb34c5196d0e88219f85322ed72448e68a034a4842143280cf906bf43652ae1933cc8d238 +AUX uw-ipop3s.xinetd 357 SHA256 7446f00962eee9da5bb79bdfb91e07108c0a9125aacc3e04515c8ff4e0e37bf1 SHA512 f60eed919c76d1a4d6f4d4f75c9801003660602b13bbf6c850ddc33c0a1a2ff087454844bdfb1caa4bb8e5239cab8cfacf84bbda485c793f14199a510d71013a WHIRLPOOL 7fa34e08e27e581f484cb2e52e707505521a3761ba79b96cf4439584df2a2c407461207532956ea1ff5c18b62c67cbffcef85ddac2977f12fdf645c3a949729e +DIST imap-2007f.tar.Z 2793529 SHA256 870e95f6bd19265832a88fd89b77c54c841c59022fd21e69254050c8b1005e3c SHA512 2c728deaf66d23158c61ae55ff94f05d2a1cf0168002760321ca30c6ee1c58c0a4c7bc14ece0097ea662df6c7c49be3b91c8e5e943724c9e2736800fa9298dae WHIRLPOOL 655536d61a178940363241ad8c94a28be75e90abf3b8c585eb61364a6394ff49bb5fd5dc6de4bec5f992f03b592e583df04f0103e8f3c167aa68a476c574c4ec +EBUILD uw-imap-2007f-r1.ebuild 4671 SHA256 905e9e1d83fce911bc1e349a4a04dc01bda94fd93d1ec455747ce2dbc5610d19 SHA512 5a2b876a9ca61d7b05a85a7be06065aea9964bd9446f1a8d71d9ccde819a96787a2f8a57fd2cbaaa86e9981a2bd73d774879d57364b3c53acd8f18eaecaa4c52 WHIRLPOOL e99d77c82940928f85749adec71329b11c51fdf27a35aff84698569206cd22c918c8f7a89528600dae6c4271958b5ce330c5c9184c7ac785575fff5de8cdf10d +EBUILD uw-imap-2007f.ebuild 4407 SHA256 fc6708200fb24b46fe72f195f4c64bf9bd5111889fc6a6d45fe9ebce48568808 SHA512 04fdd4d0f9f0bfae8b05c49107eb53b06fc3471ffe27ca0f143ae5780a839e20338878c45159b61a985de3c1987ae5db40f69530d4190993a6ef2d08f8908c63 WHIRLPOOL 74524319e9caef1ad6fdbfc08fce9d5e76a668242f80a764812f8a0d6af928a82db54cd491c9f81c3d3124711c7c78230ab9cbf1044315bbe9cdac36176717d8 +MISC ChangeLog 2682 SHA256 b6c3a5d6e0142b2c5d97ad6dd58faa135c0414d50c2548b80da0489d5e1f9875 SHA512 1a475b5275f18f5972fdcd44a524ecceeddd2f78da6ff26ab40f6b719763eb4312bb6f5808c2dbb4fb598b870e331240de6ed27ed351fa172856e29f0e2a44ef WHIRLPOOL 7f7e381628bf43a20feace4be6f93fdf42026f5927fb7602677fa8a7894745754cc73df87e3d70a55d52d91c947d8ff3cd426b6291b1389a05f34f8d06e94616 +MISC ChangeLog-2015 19182 SHA256 d672fcd778ff03342f929bf78c1982f97d7b5ce79275d5e279eb166d586d2658 SHA512 1cdd6ce39f1ac915d3a93ed0d0139c6cc4d0e25c0a211808857cbdbf9cd254882c9566a0e6013f84cbd3ce2a731ac9c7678f822596aeea4bd889e0b32c43ab16 WHIRLPOOL a3de4e0b45ae739c8a62914ed3d3caa5ec755f2dfc4620f7bd4fa4b12631fda683d3a2dd68da74c411266dc753547f851c75533447fde7aac5ef06efd853d4e7 +MISC metadata.xml 352 SHA256 6ffbc3423ccee89258e4cd081678639c37457ea7bb087069ddd6e23b0b0ac65f SHA512 ba06f1bcbf2445ea006525dd5bbd6dc9d7fb62dbc12dc90ca9ba5c9cecce3cdc9d4dfe31ba5e7a11128de4ba82e97b1b37b7f3240db1cd932c6165bc28f22324 WHIRLPOOL 59c0b7700ca50016b84464a92353b58b02976222348cc6c0a08e1245afa9988a200c6d4321e8b481a64e293d653c8bceb556b97ce47500d8371c6eaefbcb5551 diff --git a/net-mail/uw-imap/files/uw-imap-2004c-amd64-so-fix.patch b/net-mail/uw-imap/files/uw-imap-2004c-amd64-so-fix.patch new file mode 100644 index 000000000000..1400fc254c6d --- /dev/null +++ b/net-mail/uw-imap/files/uw-imap-2004c-amd64-so-fix.patch @@ -0,0 +1,13 @@ +diff -ruN src/osdep/unix/Makefile src/osdep/unix/Makefile +--- src/osdep/unix/Makefile 2005-01-29 22:43:25.739341544 +0000 ++++ src/osdep/unix/Makefile 2005-01-29 22:43:50.375596264 +0000 +@@ -912,6 +912,9 @@ + -DRSHPATH=\"$(RSHPATH)\" -DLOCKPGM=\"$(LOCKPGM)\" > OSCFLAGS + echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS + echo "$(ARRC) $(ARCHIVE) $(BINARIES);$(RANLIB) $(ARCHIVE)" > ARCHIVE ++ echo "`$(CAT) CCTYPE` `$(CAT) CFLAGS` `$(CAT) OSFLAGS` -shared \ ++ -Wl,-soname,libc-client.so.1 -o libc-client.so.1.0.0 $(BINARIES)" \ ++ >> ARCHIVE + echo $(OS) > OSTYPE + ./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy + ./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS) diff --git a/net-mail/uw-imap/files/uw-imap-ldflags.patch b/net-mail/uw-imap/files/uw-imap-ldflags.patch new file mode 100644 index 000000000000..41bd0925ed14 --- /dev/null +++ b/net-mail/uw-imap/files/uw-imap-ldflags.patch @@ -0,0 +1,52 @@ +diff --git a/Makefile b/Makefile +index e6e4987..8acfe23 100644 +--- a/Makefile ++++ b/Makefile +@@ -257,7 +257,7 @@ EXTRACFLAGS= + + # Extra linker flags (additional/alternative libraries, etc.) + +-EXTRALDFLAGS= ++EXTRALDFLAGS=${LDFLAGS} + + + # Special make flags (e.g. to override make environment variables) +diff --git a/src/mlock/Makefile b/src/mlock/Makefile +index d425da8..9c3020b 100644 +--- a/src/mlock/Makefile ++++ b/src/mlock/Makefile +@@ -36,7 +36,7 @@ CFLAGS = -O2 -pipe -march=core2 + all: mlock + + mlock: mlock.o +- $(CC) $(CFLAGS) -o mlock mlock.o ++ $(CC) $(CFLAGS) ${LDFLAGS} -o mlock mlock.o + + install: mlock + chgrp mail mlock +diff --git a/Makefile b/Makefile +index 8acfe23..70f889d 100644 +--- a/Makefile ++++ b/Makefile +@@ -698,7 +698,7 @@ rebuild: + @echo Rebuilding c-client for `$(CAT) OSTYPE`... + @$(TOUCH) SPECIALS + $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \ +- CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS` ++ CFLAGS="`$(CAT) CFLAGS`" LDFLAGS=${LDFLAGS} `$(CAT) SPECIALS` + + rebuildclean: + $(SH) -c '$(RM) rebuild || true' +diff --git a/src/osdep/unix/Makefile b/src/osdep/unix/Makefile +index ef1d059..a53318c 100644 +--- a/src/osdep/unix/Makefile ++++ b/src/osdep/unix/Makefile +@@ -969,7 +969,7 @@ onceenv: + -DLOCKPGM3=\"$(LOCKPGM3)\" > OSCFLAGS + echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS + echo "$(ARRC) $(ARCHIVE) $(BINARIES);$(RANLIB) $(ARCHIVE)" > ARCHIVE +- echo "`$(CAT) CCTYPE` `$(CAT) CFLAGS` `$(CAT) OSFLAGS` -shared \ ++ echo "`$(CAT) CCTYPE` `$(CAT) CFLAGS` `$(CAT) OSFLAGS` `$(CAT) LDFLAGS` -shared \ + -Wl,-soname,libc-client.so.1 -o libc-client.so.1.0.0 $(BINARIES)" \ + >> ARCHIVE + echo $(OS) > OSTYPE diff --git a/net-mail/uw-imap/files/uw-imap.xinetd b/net-mail/uw-imap/files/uw-imap.xinetd new file mode 100644 index 000000000000..959a45573bc1 --- /dev/null +++ b/net-mail/uw-imap/files/uw-imap.xinetd @@ -0,0 +1,14 @@ +# default: off +# description: The IMAP service allows remote users to access their mail using \ +# an IMAP client such as Mutt, Pine, fetchmail, or Netscape \ +# Communicator. +service imap2 +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/imapd + log_on_success += DURATION USERID + log_on_failure += USERID + disable = yes +} diff --git a/net-mail/uw-imap/files/uw-imaps.xinetd b/net-mail/uw-imap/files/uw-imaps.xinetd new file mode 100644 index 000000000000..8fb2f3500a78 --- /dev/null +++ b/net-mail/uw-imap/files/uw-imaps.xinetd @@ -0,0 +1,15 @@ +# default: off +# description: The IMAPS service allows remote users to access their mail \ +# using an IMAP client with SSL support such as Netscape \ +# Communicator or fetchmail. +service imaps +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/imapd + log_on_success += DURATION USERID + log_on_failure += USERID + disable = yes +} + diff --git a/net-mail/uw-imap/files/uw-ipop2.xinetd b/net-mail/uw-imap/files/uw-ipop2.xinetd new file mode 100644 index 000000000000..8a7ac2ae9b41 --- /dev/null +++ b/net-mail/uw-imap/files/uw-ipop2.xinetd @@ -0,0 +1,15 @@ +# default: off +# description: The POP2 service allows remote users to access their mail \ +# using an POP2 client such as fetchmail. In most cases, clients \ +# support POP3 instead of POP2, so enabling this service is rarely \ +# necessary. +service pop-2 +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/ipop2d + log_on_success += USERID + log_on_failure += USERID + disable = yes +} diff --git a/net-mail/uw-imap/files/uw-ipop3.xinetd b/net-mail/uw-imap/files/uw-ipop3.xinetd new file mode 100644 index 000000000000..60acaf219cf2 --- /dev/null +++ b/net-mail/uw-imap/files/uw-ipop3.xinetd @@ -0,0 +1,14 @@ +# default: off +# description: The POP3 service allows remote users to access their mail \ +# using an POP3 client such as Netscape Communicator, mutt, \ +# or fetchmail. +service pop-3 +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/ipop3d + log_on_success += USERID + log_on_failure += USERID + disable = yes +} diff --git a/net-mail/uw-imap/files/uw-ipop3s.xinetd b/net-mail/uw-imap/files/uw-ipop3s.xinetd new file mode 100644 index 000000000000..a8b2ad19d971 --- /dev/null +++ b/net-mail/uw-imap/files/uw-ipop3s.xinetd @@ -0,0 +1,14 @@ +# default: off +# description: The POP3 service allows remote users to access their mail \ +# using an POP3 client such as Netscape Communicator, mutt, \ +# or fetchmail. +service pop3s +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/ipop3d + log_on_success += USERID + log_on_failure += USERID + disable = yes +} diff --git a/net-mail/uw-imap/metadata.xml b/net-mail/uw-imap/metadata.xml new file mode 100644 index 000000000000..7b9eb3253953 --- /dev/null +++ b/net-mail/uw-imap/metadata.xml @@ -0,0 +1,11 @@ + + + + + net-mail@gentoo.org + Net-Mail + + + Enables cleartext logins outside of SSL sessions + + diff --git a/net-mail/uw-imap/uw-imap-2007f-r1.ebuild b/net-mail/uw-imap/uw-imap-2007f-r1.ebuild new file mode 100644 index 000000000000..0e4154f69a6a --- /dev/null +++ b/net-mail/uw-imap/uw-imap-2007f-r1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils flag-o-matic ssl-cert multilib + +MY_P="imap-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="UW server daemons for IMAP and POP network mail protocols" +SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z" +HOMEPAGE="http://www.washington.edu/imap/" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86" +IUSE="ipv6 +ssl kerberos clearpasswd" + +DEPEND="!net-libs/c-client + >=sys-libs/pam-0.72 + >=net-mail/mailbase-0.00-r8[pam] + ssl? ( dev-libs/openssl ) + kerberos? ( app-crypt/mit-krb5 )" + +RDEPEND="${DEPEND} + >=net-mail/uw-mailutils-${PV} + sys-apps/xinetd" + +# get rid of old style virtual - bug 350792 +# all blockers really needed? +RDEPEND="${RDEPEND} + !net-mail/dovecot + !mail-mta/courier + !net-mail/courier-imap + !net-mail/cyrus-imapd" + +REQUIRED_USE="!clearpasswd? ( ssl )" + +src_unpack() { + unpack ${A} + # Tarball packed with bad file perms + chmod -R ug+w "${S}" +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2004c-amd64-so-fix.patch + epatch "${FILESDIR}/${PN}-ldflags.patch" + + # no interactive build + sed -i -e "/read x; case/s/^/#/" Makefile || die + sed -i -e "/make noip6/s/.*/\t@echo/" Makefile || die + + # Now we must make all the individual Makefiles use different CFLAGS, + # otherwise they would all use -fPIC + sed -i -e "s|\`cat \$C/CFLAGS\`|${CFLAGS}|g" src/dmail/Makefile \ + src/imapd/Makefile src/ipopd/Makefile src/mailutil/Makefile \ + src/mlock/Makefile src/mtest/Makefile src/tmail/Makefile \ + || die "sed failed patching Makefile FLAGS." + + # Now there is only c-client left, which should be built with -fPIC + append-flags -fPIC + + sed -i \ + -e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \ + -e 's,SSLDIR=/usr/local/ssl,SSLDIR=/usr,g' \ + -e 's,SSLCERTS=$(SSLDIR)/certs,SSLCERTS=/etc/ssl/certs,g' \ + src/osdep/unix/Makefile || die + + sed -i \ + -e "s/CC=cc/CC=$(tc-getCC)/" \ + -e "s/ARRC=ar/ARRC=$(tc-getAR)/" \ + -e "s/RANLIB=ranlib/RANLIB=$(tc-getRANLIB)/" \ + src/osdep/unix/Makefile || die + + sed -i -e "s,GSSDIR=/usr/local,GSSDIR=/usr,g" \ + src/osdep/unix/Makefile.gss || die + + # Make the build system more multilib aware + sed \ + -e "s:^SSLLIB=\$(SSLDIR)/lib:SSLLIB=\$(SSLDIR)/$(get_libdir):" \ + -e "s:^AFSLIB=\$(AFSDIR)/lib:AFSLIB=\$(AFSDIR)/$(get_libdir):" \ + -i src/osdep/unix/Makefile || die "Makefile sed fixing failed" +} + +src_compile() { + local mymake ipver ssltype target + ipver="IP=4" + target=lnp + use ipv6 && ipver="IP=6" + use kerberos && mymake="EXTRAAUTHENTICATORS=gss" + use kernel_FreeBSD && target=bsf + if use ssl ; then + if use clearpasswd ; then + ssltype=unix + else + ssltype=unix.nopwd + fi + else + ssltype=none + fi + + emake -j1 SSLTYPE=${ssltype} ${target} ${mymake} ${ipver} EXTRACFLAGS="${CFLAGS}" EXTRALDFLAGS="${LDFLAGS}" +} + +src_install() { + dosbin imapd/imapd ipopd/ipop?d dmail/dmail tmail/tmail + dobin mlock/mlock + + dolib.so c-client/libc-client.so.1.0.0 + dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so + dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1 + + insinto /usr/include/imap + doins src/c-client/{c-client,flstring,mail,imap4r1,rfc822,misc,smtp,nntp,utf8,utf8aux}.h + doins src/c-client/{env,fs,ftl,nl,tcp}.h + doins src/osdep/unix/env_unix.h + doins c-client/linkage.{c,h} + + dolib.a c-client/c-client.a + dosym c-client.a /usr/$(get_libdir)/libc-client.a + + doman src/ipopd/ipopd.8 src/imapd/imapd.8 + doman src/dmail/dmail.1 src/tmail/tmail.1 + dodoc README docs/*.txt docs/CONFIG docs/RELNOTES + + docinto rfc + dodoc docs/rfc/*.txt + + # install headers - bug #375393 + cp c-client/*.h "${D}"/usr/include/imap/ || die + cp c-client/linkage.c "${D}"/usr/include/imap/ || die + #exclude these dupes (can't do it before now due to symlink hell) + rm "${D}"/usr/include/imap/os_*.h + + # gentoo config stuff + insinto /etc/xinetd.d + newins "${FILESDIR}"/uw-imap.xinetd imap + newins "${FILESDIR}"/uw-ipop2.xinetd ipop2 + newins "${FILESDIR}"/uw-ipop3.xinetd ipop3 + newins "${FILESDIR}"/uw-ipop3s.xinetd ipop3s + newins "${FILESDIR}"/uw-imaps.xinetd imaps +} + +pkg_postinst() { + if use ssl; then + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/ssl/certs/imapd.pem && \ + -e "${ROOT}"/etc/ssl/certs/imapd.key ]]; then + einfo "Creating SSL certificate for IMAP" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-UW-IMAP Server}" + install_cert /etc/ssl/certs/imapd + fi + if ! [[ -e "${ROOT}"/etc/ssl/certs/ipop3d.pem && \ + -e "${ROOT}"/etc/ssl/certs/ipop3d.key ]]; then + einfo "Creating SSL certificate for POP3" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-UW-POP3 Server}" + install_cert /etc/ssl/certs/ipop3d + fi + fi +} diff --git a/net-mail/uw-imap/uw-imap-2007f.ebuild b/net-mail/uw-imap/uw-imap-2007f.ebuild new file mode 100644 index 000000000000..b0baee1ca4e6 --- /dev/null +++ b/net-mail/uw-imap/uw-imap-2007f.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils flag-o-matic ssl-cert + +MY_P="imap-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="UW server daemons for IMAP and POP network mail protocols" +SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z" +HOMEPAGE="http://www.washington.edu/imap/" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86" +IUSE="ipv6 +ssl kerberos clearpasswd" + +DEPEND="!net-libs/c-client + >=sys-libs/pam-0.72 + >=net-mail/mailbase-0.00-r8[pam] + ssl? ( dev-libs/openssl ) + kerberos? ( app-crypt/mit-krb5 )" + +RDEPEND="${DEPEND} + >=net-mail/uw-mailutils-${PV} + sys-apps/xinetd" + +# get rid of old style virtual - bug 350792 +# all blockers really needed? +RDEPEND="${RDEPEND} + !net-mail/dovecot + !mail-mta/courier + !net-mail/courier-imap + !net-mail/cyrus-imapd" + +REQUIRED_USE="!clearpasswd? ( ssl )" + +src_unpack() { + unpack ${A} + # Tarball packed with bad file perms + chmod -R ug+w "${S}" +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2004c-amd64-so-fix.patch + epatch "${FILESDIR}/${PN}-ldflags.patch" + + # no interactive build + sed -i -e "/read x; case/s/^/#/" Makefile || die + + # Now we must make all the individual Makefiles use different CFLAGS, + # otherwise they would all use -fPIC + sed -i -e "s|\`cat \$C/CFLAGS\`|${CFLAGS}|g" src/dmail/Makefile \ + src/imapd/Makefile src/ipopd/Makefile src/mailutil/Makefile \ + src/mlock/Makefile src/mtest/Makefile src/tmail/Makefile \ + || die "sed failed patching Makefile FLAGS." + + # Now there is only c-client left, which should be built with -fPIC + append-flags -fPIC + + sed -i \ + -e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \ + -e 's,SSLDIR=/usr/local/ssl,SSLDIR=/usr,g' \ + -e 's,SSLCERTS=$(SSLDIR)/certs,SSLCERTS=/etc/ssl/certs,g' \ + src/osdep/unix/Makefile + + sed -i \ + -e "s/CC=cc/CC=$(tc-getCC)/" \ + -e "s/ARRC=ar/ARRC=$(tc-getAR)/" \ + -e "s/RANLIB=ranlib/RANLIB=$(tc-getRANLIB)/" \ + src/osdep/unix/Makefile + + sed -i -e "s,GSSDIR=/usr/local,GSSDIR=/usr,g" \ + src/osdep/unix/Makefile.gss + + # no interactive build + sed -i -e "/make noip6/s/.*/\t@echo/" Makefile +} + +src_compile() { + local mymake ipver ssltype target + ipver="IP=4" + target=lnp + use ipv6 && ipver="IP=6" + use kerberos && mymake="EXTRAAUTHENTICATORS=gss" + use kernel_FreeBSD && target=bsf + if use ssl ; then + if use clearpasswd ; then + ssltype=unix + else + ssltype=unix.nopwd + fi + else + ssltype=none + fi + + emake -j1 SSLTYPE=${ssltype} ${target} ${mymake} ${ipver} EXTRACFLAGS="${CFLAGS}" EXTRALDFLAGS="${LDFLAGS}" +} + +src_install() { + dosbin imapd/imapd ipopd/ipop?d dmail/dmail tmail/tmail + dobin mlock/mlock + + dolib.so c-client/libc-client.so.1.0.0 + dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so + dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1 + + insinto /usr/include/imap + doins src/c-client/{c-client,flstring,mail,imap4r1,rfc822,misc,smtp,nntp,utf8,utf8aux}.h + doins src/c-client/{env,fs,ftl,nl,tcp}.h + doins src/osdep/unix/env_unix.h + doins c-client/linkage.{c,h} + + dolib.a c-client/c-client.a + dosym c-client.a /usr/$(get_libdir)/libc-client.a + + doman src/ipopd/ipopd.8 src/imapd/imapd.8 + doman src/dmail/dmail.1 src/tmail/tmail.1 + dodoc README docs/*.txt docs/CONFIG docs/RELNOTES + + docinto rfc + dodoc docs/rfc/*.txt + + # install headers - bug #375393 + cp c-client/*.h "${D}"/usr/include/imap/ || die + cp c-client/linkage.c "${D}"/usr/include/imap/ || die + #exclude these dupes (can't do it before now due to symlink hell) + rm "${D}"/usr/include/imap/os_*.h + + # gentoo config stuff + insinto /etc/xinetd.d + newins "${FILESDIR}"/uw-imap.xinetd imap + newins "${FILESDIR}"/uw-ipop2.xinetd ipop2 + newins "${FILESDIR}"/uw-ipop3.xinetd ipop3 + newins "${FILESDIR}"/uw-ipop3s.xinetd ipop3s + newins "${FILESDIR}"/uw-imaps.xinetd imaps +} + +pkg_postinst() { + if use ssl; then + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/ssl/certs/imapd.pem && \ + -e "${ROOT}"/etc/ssl/certs/imapd.key ]]; then + einfo "Creating SSL certificate for IMAP" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-UW-IMAP Server}" + install_cert /etc/ssl/certs/imapd + fi + if ! [[ -e "${ROOT}"/etc/ssl/certs/ipop3d.pem && \ + -e "${ROOT}"/etc/ssl/certs/ipop3d.key ]]; then + einfo "Creating SSL certificate for POP3" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-UW-POP3 Server}" + install_cert /etc/ssl/certs/ipop3d + fi + fi +} -- cgit v1.2.3