summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/vpopmail/ChangeLog6
-rw-r--r--net-mail/vpopmail/Manifest3
-rw-r--r--net-mail/vpopmail/files/digest-vpopmail-5.4.9-r21
-rw-r--r--net-mail/vpopmail/files/vpopmail-fPIC.patch126
-rw-r--r--net-mail/vpopmail/vpopmail-5.4.9-r2.ebuild249
5 files changed, 384 insertions, 1 deletions
diff --git a/net-mail/vpopmail/ChangeLog b/net-mail/vpopmail/ChangeLog
index 27947fc91b5b..4a4aa1aed56d 100644
--- a/net-mail/vpopmail/ChangeLog
+++ b/net-mail/vpopmail/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-mail/vpopmail
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.56 2005/05/10 02:30:34 anarchy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.57 2005/05/25 19:02:31 anarchy Exp $
+
+ 25 May 2005; Jory A. Pratt <anarchy@gentoo.org>
+ +files/vpopmail-fPIC.patch, +vpopmail-5.4.9-r2.ebuild:
+ added pure -fPIC on libvpopmail.a only
*vpopmail-5.5.0 (10 May 2005)
diff --git a/net-mail/vpopmail/Manifest b/net-mail/vpopmail/Manifest
index 1c1fa8ff2553..e575754f4d85 100644
--- a/net-mail/vpopmail/Manifest
+++ b/net-mail/vpopmail/Manifest
@@ -4,6 +4,7 @@ MD5 a9c3c67b2737cf350be6e4fe66de5c77 vpopmail-5.2.2-r1.ebuild 7452
MD5 66dd4d3fc62840431c0e01d9e891c3a1 vpopmail-5.4.6-r1.ebuild 7649
MD5 ebdc11c77e0972c18e954b43a5a20b30 vpopmail-5.4.9-r1.ebuild 7709
MD5 4f49cf51d305d47a75d0194cc8511970 vpopmail-5.5.0.ebuild 7743
+MD5 e38e37bf76889be01bba4e143f894c3b vpopmail-5.4.9-r2.ebuild 7782
MD5 3041a3223960dc956b67ac1230f00db7 files/99vpopmail 86
MD5 d0bc9f5393a1f0602c71fdee0b3d2cd8 files/digest-vpopmail-5.2.2-r1 134
MD5 1c75d4c70c599202edf1d9599bf40ef2 files/digest-vpopmail-5.4.6-r1 66
@@ -16,3 +17,5 @@ MD5 63284ad7aa0644157e4b754b969a8421 files/vpopmail.conf 466
MD5 4b9ecca5815031b05bd173888da4d228 files/vpopmail-cdb-Makefile.patch 363
MD5 aea08e2e6df4cf89a2a32a8817cc7135 files/digest-vpopmail-5.4.9-r1 66
MD5 8d771dd64d54f0155c257749cbcb8b7a files/digest-vpopmail-5.5.0 66
+MD5 aa40d1572827d929f64cdcdabb71f437 files/vpopmail-fPIC.patch 7397
+MD5 aea08e2e6df4cf89a2a32a8817cc7135 files/digest-vpopmail-5.4.9-r2 66
diff --git a/net-mail/vpopmail/files/digest-vpopmail-5.4.9-r2 b/net-mail/vpopmail/files/digest-vpopmail-5.4.9-r2
new file mode 100644
index 000000000000..cfc2704d5001
--- /dev/null
+++ b/net-mail/vpopmail/files/digest-vpopmail-5.4.9-r2
@@ -0,0 +1 @@
+MD5 cbf3559ac4ac7efce6252a1c77facd80 vpopmail-5.4.9.tar.gz 432503
diff --git a/net-mail/vpopmail/files/vpopmail-fPIC.patch b/net-mail/vpopmail/files/vpopmail-fPIC.patch
new file mode 100644
index 000000000000..716cae833e74
--- /dev/null
+++ b/net-mail/vpopmail/files/vpopmail-fPIC.patch
@@ -0,0 +1,126 @@
+diff -urN vpopmail-5.4.9-orig/Makefile.am vpopmail-5.4.9/Makefile.am
+--- vpopmail-5.4.9-orig/Makefile.am 2005-05-25 14:51:18.369559672 -0400
++++ vpopmail-5.4.9/Makefile.am 2005-05-25 14:51:48.388996024 -0400
+@@ -18,6 +18,7 @@
+
+ libvpopmail_a_SOURCES=$(COMMONSOURCES)
+ libvpopmail_a_LIBADD = cdb/*.o
++libvpopmail_a_CFLAGS = -fPIC
+
+ vpopmailbindir=@vpopmaildir@/bin
+ vpopmailbin_PROGRAMS = vchkpw vdelivermail clearopensmtp vadddomain \
+diff -urN vpopmail-5.4.9-orig/Makefile.in vpopmail-5.4.9/Makefile.in
+--- vpopmail-5.4.9-orig/Makefile.in 2005-05-25 14:51:18.369559672 -0400
++++ vpopmail-5.4.9/Makefile.in 2005-05-25 14:53:35.568702232 -0400
+@@ -101,6 +101,7 @@
+
+ libvpopmail_a_SOURCES = $(COMMONSOURCES)
+ libvpopmail_a_LIBADD = cdb/*.o
++libvpopmail_a_CFLAGS = -fPIC
+
+ vpopmailbindir = @vpopmaildir@/bin
+ vpopmailbin_PROGRAMS = vchkpw vdelivermail clearopensmtp vadddomain \
+@@ -192,9 +193,12 @@
+
+ libvpopmail_a_AR = $(AR) cru
+ libvpopmail_a_DEPENDENCIES = cdb/*.o
+-am__objects_1 = vpopmail.$(OBJEXT) md5.$(OBJEXT) bigdir.$(OBJEXT) \
+- vauth.$(OBJEXT) file_lock.$(OBJEXT) vpalias.$(OBJEXT) \
+- seek.$(OBJEXT) vlimits.$(OBJEXT) maildirquota.$(OBJEXT)
++am__objects_1 = libvpopmail_a-vpopmail.$(OBJEXT) \
++ libvpopmail_a-md5.$(OBJEXT) libvpopmail_a-bigdir.$(OBJEXT) \
++ libvpopmail_a-vauth.$(OBJEXT) libvpopmail_a-file_lock.$(OBJEXT) \
++ libvpopmail_a-vpalias.$(OBJEXT) libvpopmail_a-seek.$(OBJEXT) \
++ libvpopmail_a-vlimits.$(OBJEXT) \
++ libvpopmail_a-maildirquota.$(OBJEXT)
+ am_libvpopmail_a_OBJECTS = $(am__objects_1)
+ libvpopmail_a_OBJECTS = $(am_libvpopmail_a_OBJECTS)
+ vpopmailbin_PROGRAMS = vchkpw$(EXEEXT) vdelivermail$(EXEEXT) \
+@@ -327,8 +331,8 @@
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
+ DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
+- Makefile.in aclocal.m4 config.guess config.h.in config.sub \
+- configure configure.in install-sh ltmain.sh missing \
++ Makefile.in aclocal.m4 compile config.guess config.h.in \
++ config.sub configure configure.in install-sh ltmain.sh missing \
+ mkinstalldirs
+ DIST_SUBDIRS = $(SUBDIRS)
+ SOURCES = $(libvpopmail_a_SOURCES) $(clearopensmtp_SOURCES) $(dotqmail2valias_SOURCES) $(vaddaliasdomain_SOURCES) $(vadddomain_SOURCES) $(vadduser_SOURCES) $(valias_SOURCES) $(vchangepw_SOURCES) $(vchkpw_SOURCES) $(vconvert_SOURCES) $(vdeldomain_SOURCES) $(vdelivermail_SOURCES) $(vdeloldusers_SOURCES) $(vdeluser_SOURCES) $(vdominfo_SOURCES) $(vipmap_SOURCES) $(vkill_SOURCES) $(vmkpasswd_SOURCES) $(vmoddomlimits_SOURCES) $(vmoduser_SOURCES) $(vpasswd_SOURCES) $(vpopbull_SOURCES) $(vsetuserquota_SOURCES) $(vuserinfo_SOURCES)
+@@ -376,6 +380,15 @@
+
+ clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
++libvpopmail_a-vpopmail.$(OBJEXT): vpopmail.c
++libvpopmail_a-md5.$(OBJEXT): md5.c
++libvpopmail_a-bigdir.$(OBJEXT): bigdir.c
++libvpopmail_a-vauth.$(OBJEXT): vauth.c
++libvpopmail_a-file_lock.$(OBJEXT): file_lock.c
++libvpopmail_a-vpalias.$(OBJEXT): vpalias.c
++libvpopmail_a-seek.$(OBJEXT): seek.c
++libvpopmail_a-vlimits.$(OBJEXT): vlimits.c
++libvpopmail_a-maildirquota.$(OBJEXT): maildirquota.c
+ libvpopmail.a: $(libvpopmail_a_OBJECTS) $(libvpopmail_a_DEPENDENCIES)
+ -rm -f libvpopmail.a
+ $(libvpopmail_a_AR) libvpopmail.a $(libvpopmail_a_OBJECTS) $(libvpopmail_a_LIBADD)
+@@ -485,6 +498,60 @@
+
+ .c.obj:
+ $(COMPILE) -c `cygpath -w $<`
++
++libvpopmail_a-vpopmail.o: vpopmail.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vpopmail.o `test -f 'vpopmail.c' || echo '$(srcdir)/'`vpopmail.c
++
++libvpopmail_a-vpopmail.obj: vpopmail.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vpopmail.obj `cygpath -w vpopmail.c`
++
++libvpopmail_a-md5.o: md5.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-md5.o `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
++
++libvpopmail_a-md5.obj: md5.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-md5.obj `cygpath -w md5.c`
++
++libvpopmail_a-bigdir.o: bigdir.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-bigdir.o `test -f 'bigdir.c' || echo '$(srcdir)/'`bigdir.c
++
++libvpopmail_a-bigdir.obj: bigdir.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-bigdir.obj `cygpath -w bigdir.c`
++
++libvpopmail_a-vauth.o: vauth.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vauth.o `test -f 'vauth.c' || echo '$(srcdir)/'`vauth.c
++
++libvpopmail_a-vauth.obj: vauth.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vauth.obj `cygpath -w vauth.c`
++
++libvpopmail_a-file_lock.o: file_lock.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-file_lock.o `test -f 'file_lock.c' || echo '$(srcdir)/'`file_lock.c
++
++libvpopmail_a-file_lock.obj: file_lock.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-file_lock.obj `cygpath -w file_lock.c`
++
++libvpopmail_a-vpalias.o: vpalias.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vpalias.o `test -f 'vpalias.c' || echo '$(srcdir)/'`vpalias.c
++
++libvpopmail_a-vpalias.obj: vpalias.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vpalias.obj `cygpath -w vpalias.c`
++
++libvpopmail_a-seek.o: seek.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-seek.o `test -f 'seek.c' || echo '$(srcdir)/'`seek.c
++
++libvpopmail_a-seek.obj: seek.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-seek.obj `cygpath -w seek.c`
++
++libvpopmail_a-vlimits.o: vlimits.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vlimits.o `test -f 'vlimits.c' || echo '$(srcdir)/'`vlimits.c
++
++libvpopmail_a-vlimits.obj: vlimits.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-vlimits.obj `cygpath -w vlimits.c`
++
++libvpopmail_a-maildirquota.o: maildirquota.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-maildirquota.o `test -f 'maildirquota.c' || echo '$(srcdir)/'`maildirquota.c
++
++libvpopmail_a-maildirquota.obj: maildirquota.c
++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvpopmail_a_CFLAGS) $(CFLAGS) -c -o libvpopmail_a-maildirquota.obj `cygpath -w maildirquota.c`
+ uninstall-info-am:
+
+ # This directory's subdirectories are mostly independent; you can cd
diff --git a/net-mail/vpopmail/vpopmail-5.4.9-r2.ebuild b/net-mail/vpopmail/vpopmail-5.4.9-r2.ebuild
new file mode 100644
index 000000000000..ea8e9f130d0d
--- /dev/null
+++ b/net-mail/vpopmail/vpopmail-5.4.9-r2.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/vpopmail-5.4.9-r2.ebuild,v 1.3 2005/05/25 19:02:31 anarchy Exp $
+
+inherit eutils gnuconfig fixheadtails flag-o-matic
+
+# TODO: all ldap, sybase support
+#MY_PV=${PV/_/-}
+#MY_P=${PN}-${MY_PV}
+HOMEPAGE="http://www.inter7.com/index.php?page=vpopmail"
+DESCRIPTION="A collection of programs to manage virtual email domains and accounts on your Qmail or Postfix mail servers."
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc ~amd64 ~ppc"
+IUSE="mysql ipalias clearpasswd"
+# vpopmail will NOT build if non-root.
+RESTRICT="nouserpriv"
+DEPEND_COMMON="mail-mta/qmail
+ mysql? ( >=dev-db/mysql-3.23 )"
+DEPEND="sys-apps/sed
+ sys-apps/ucspi-tcp
+ ${DEPEND_COMMON}"
+RDEPEND="${DEPEND_COMMON}
+ virtual/cron"
+
+# S="${WORKDIR}/${MY_P}"
+
+# Define vpopmail home dir in /etc/password if different
+VPOP_DEFAULT_HOME="/var/vpopmail"
+VPOP_HOME="$VPOP_DEFAULT_HOME"
+
+# This makes sure the variable is set, and that it isn't null.
+vpopmail_set_homedir() {
+ VPOP_HOME=`getent passwd vpopmail | cut -d: -f6`
+ if [ -z "$VPOP_HOME" ]; then
+ echo -ne "\a"
+ eerror "vpopmail's home directory is null in passwd data!"
+ eerror "You probably want to check that out."
+ eerror "Continuing with default."
+ VPOP_HOME="${VPOP_DEFAULT_HOME}"
+ else
+ einfo "Setting VPOP_HOME to: $VPOP_HOME"
+ fi
+}
+
+pkg_setup() {
+ enewgroup vpopmail 89
+ enewuser vpopmail 89 /bin/false ${VPOP_DEFAULT_HOME} vpopmail
+ upgradewarning
+}
+
+src_unpack() {
+ # cd ${WORKDIR}
+ # unpack ${MY_P}.tar.gz
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${P}-access.violation.patch || die "failed to patch."
+ epatch ${FILESDIR}/${PN}-fPIC.patch || die "failed to patch Makefiles."
+ sed -i \
+ 's|Maildir|.maildir|g' \
+ vchkpw.c vconvert.c vdelivermail.c \
+ vpopbull.c vpopmail.c vqmaillocal.c \
+ vuserinfo.c maildirquota.c \
+ || die "failed to change Maildir to .maildir"
+ sed -i \
+ '/printf.*vpopmail/s:vpopmail (:(:' \
+ vdelivermail.c vpopbull.c vqmaillocal.c \
+ || die "failed to remove vpopmail advertisement"
+
+ gnuconfig_update
+ autoconf || die "reconfigure failed."
+ ht_fix_file ${S}/cdb/Makefile || die "failed to fix file"
+ epatch ${FILESDIR}/vpopmail-cdb-Makefile.patch || die "failed to patch Makefile"
+}
+
+src_compile() {
+ vpopmail_set_homedir
+
+ use ipalias \
+ && myopts="${myopts} --enable-ip-alias-domains=y" \
+ || myopts="${myopts} --enable-ip-alias-domains=n"
+
+ use mysql \
+ && myopts="${myopts} --enable-auth-module=mysql \
+ --enable-libs=/usr/include/mysql \
+ --enable-libdir=/usr/lib/mysql \
+ --enable-sql-logging=y \
+ --enable-auth-logging=y \
+ --enable-valias=y \
+ --enable-mysql-replication=n \
+ --enable-mysql-limits"
+
+ # Bug 20127
+ use clearpasswd \
+ && myopts="${myopts} --enable-clear-passwd=y" \
+ || myopts="${myopts} --enable-clear-passwd=n"
+
+ use amd64 && append-flags -fPIC
+
+ econf \
+ ${myopts} \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --sysconfdir=${VPOP_HOME}/etc \
+ --enable-qmaildir=/var/qmail \
+ --enable-qmail-newu=/var/qmail/bin/qmail-newu \
+ --enable-qmail-inject=/var/qmail/bin/qmail-inject \
+ --enable-qmail-newmrh=/var/qmail/bin/qmail-newmrh \
+ --enable-vpopuser=vpopmail \
+ --enable-many-domains=y \
+ --enable-vpopgroup=vpopmail \
+ --enable-file-locking=y \
+ --enable-file-sync=y \
+ --enable-md5-passwords=y \
+ --enable-logging=y \
+ --enable-log-name=vpopmail \
+ --enable-qmail-ext \
+ --enable-domainquotas \
+ --disable-tcp-rules-prog --disable-tcpserver-file --disable-roaming-users \
+ || die
+
+ # TCPRULES for relaying is now considered obsolete, use relay-ctrl instead
+ #--enable-tcprules-prog=/usr/bin/tcprules --enable-tcpserver-file=/etc/tcp.smtp \
+ #--enable-roaming-users=y --enable-relay-clear-minutes=60 \
+ #--disable-rebuild-tcpserver-file \
+ emake || die "Make failed."
+}
+
+src_install() {
+ vpopmail_set_homedir
+
+ make DESTDIR=${D} install || die
+ dosed ${VPOP_HOME}/etc/inc_deps
+ dosed ${VPOP_HOME}/etc/lib_deps
+
+ into /var/vpopmail
+ dobin ${FILESDIR}/vpopmail-Maildir-dotmaildir-fix.sh
+ into /usr
+
+ # Install documentation.
+ dodoc AUTHORS ChangeLog FAQ INSTALL README*
+ dodoc doc/doc_html/* doc/man_html/*
+ rm -rf ${D}/${VPOP_HOME}/doc
+ dosym /usr/share/doc/${PF}/ ${VPOP_HOME}/doc
+
+ # Create /etc/vpopmail.conf
+ if use mysql ; then
+ einfo "Installing vpopmail mysql configuration file"
+ dodir /etc
+ #config file position
+ mv ${D}/var/vpopmail/etc/vpopmail.mysql ${D}/etc/vpopmail.conf
+ dosym /etc/vpopmail.conf /var/vpopmail/etc/vpopmail.mysql
+ sed -e '12d' -i ${D}/etc/vpopmail.conf
+ echo '# Read-only DB' >>${D}/etc/vpopmail.conf
+ echo 'localhost|0|vpopmail|secret|vpopmail' >>${D}/etc/vpopmail.conf
+ echo '# Write DB' >>${D}/etc/vpopmail.conf
+ echo 'localhost|0|vpopmail|secret|vpopmail' >>${D}/etc/vpopmail.conf
+ # lock down perms
+ fperms 640 /etc/vpopmail.conf
+ fowners root:vpopmail /etc/vpopmail.conf
+ fi
+
+ # Install a proper cronjob instead of the old nastiness
+ #einfo "Installing cronjob"
+ #dodir /etc/cron.hourly
+ #insinto /etc/cron.hourly
+ #doins ${FILESDIR}/vpopmail.clearopensmtp
+ #fperms +x /etc/cron.hourly/vpopmail.clearopensmtp
+
+ einfo "Installing env.d entry"
+ dodir /etc/env.d
+ insinto /etc/env.d
+ doins ${FILESDIR}/99vpopmail
+
+ # Configure b0rked. We'll do this manually
+ #echo "-I${VPOP_HOME}/include" > ${D}/${VPOP_HOME}/etc/inc_deps
+ #local libs_extra
+ #use mysql && libs_extra="-L/usr/lib/mysql -lmysqlclient -lz" || libs_extra=""
+ #echo "-L${VPOP_HOME}/lib -lvpopmail ${libs_extra}" > ${D}/${VPOP_HOME}/etc/lib_deps
+
+ einfo "Locking down vpopmail permissions"
+ # secure things more, i don't want the vpopmail user being able to write this stuff!
+ chown -R root:root ${D}${VPOP_HOME}/{bin,etc,include}
+ chown root:vpopmail ${D}${VPOP_HOME}/bin/vchkpw
+ chmod 4711 ${D}${VPOP_HOME}/bin/vchkpw
+}
+
+pkg_preinst() {
+ vpopmail_set_homedir
+
+ # Keep DATA
+ keepdir ${VPOP_HOME}/domains
+
+ # This is a workaround until portage handles binary packages+users better.
+ pkg_setup
+
+ upgradewarning
+}
+
+pkg_postinst() {
+ einfo "Performing post-installation routines for ${P}."
+
+ if use mysql ; then
+ echo
+ einfo "You have 'mysql' turned on in your USE"
+ einfo "Vpopmail needs a VALID MySQL USER. Let's call it 'vpopmail'"
+ einfo "You MUST add it and then specify its passwd in the /etc/vpopmail.conf file"
+ echo
+ einfo "First log into mysql as your mysql root user and pass. Then:"
+ einfo "> create database vpopmail;"
+ einfo "> use mysql;"
+ einfo "> grant select, insert, update, delete, create, drop on vpopmail.* to"
+ einfo " vpopmail@localhost identified by 'your password';"
+ einfo "> flush privileges;"
+ echo
+ einfo "If you have problems with vpopmail not accepting mail properly,"
+ einfo "please ensure that /etc/vpopmail.conf is chmod 640 and"
+ einfo "owned by root:vpopmail"
+ fi
+ # do this for good measure
+ if [ -e /etc/vpopmail.conf ] ; then
+ chmod 640 /etc/vpopmail.conf
+ chown root:vpopmail /etc/vpopmail.conf
+ fi
+
+ upgradewarning
+}
+
+pkg_postrm() {
+ vpopmail_set_homedir
+
+ einfo "The vpopmail DATA will NOT be removed automatically."
+ einfo "You can delete them manually by removing the ${VPOP_HOME} directory."
+}
+
+upgradewarning() {
+ ewarn "Massive important warning if you are upgrading to 5.2.1-r8 or older"
+ ewarn "The internal structure of the mail storage has changed for"
+ ewarn "consistancy with the rest of Gentoo! Please review and utilize the "
+ ewarn "script at /var/vpopmail/bin/vpopmail-Maildir-dotmaildir-fix.sh"
+ ewarn "to upgrade your system! (It can do conversions both ways)."
+ ewarn "You should be able to run it right away without any changes."
+ echo
+ einfo "Use of vpopmail's tcp.smtp[.cdb] is also deprecated now, consider"
+ einfo "using net-mail/relay-ctrl instead."
+}