aboutsummaryrefslogtreecommitdiff
path: root/mail/perdition
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2003-07-03 05:54:50 +0000
committerMaho Nakata <maho@FreeBSD.org>2003-07-03 05:54:50 +0000
commit805e567768a5b17638baea19239da4510dc0cf88 (patch)
tree66eaf068a43a2932fb0985a909187454f01cf97a /mail/perdition
parent5ad1c2139956ead41b445fefb3ea2430bd711688 (diff)
downloadports-805e567768a5b17638baea19239da4510dc0cf88.tar.gz
ports-805e567768a5b17638baea19239da4510dc0cf88.zip
Notes
Diffstat (limited to 'mail/perdition')
-rw-r--r--mail/perdition/Makefile131
-rw-r--r--mail/perdition/distinfo2
-rw-r--r--mail/perdition/files/patch-aa19
-rw-r--r--mail/perdition/files/patch-ab25
-rw-r--r--mail/perdition/files/patch-ac19
-rw-r--r--mail/perdition/files/patch-ad19
-rw-r--r--mail/perdition/files/patch-ae25
-rw-r--r--mail/perdition/files/patch-af25
-rw-r--r--mail/perdition/files/patch-ag25
-rw-r--r--mail/perdition/files/patch-ah25
-rw-r--r--mail/perdition/files/patch-ai24
-rw-r--r--mail/perdition/files/patch-aj10
-rw-r--r--mail/perdition/files/patch-ak11
-rw-r--r--mail/perdition/files/patch-etc-Makefile.in11
-rw-r--r--mail/perdition/files/patch-etc-perdition-Makefile.in18
-rw-r--r--mail/perdition/files/patch-makebdb-Makefile.in11
-rw-r--r--mail/perdition/files/patch-makebdb-makebdb.c11
-rw-r--r--mail/perdition/files/patch-perdition-db-bdb-Makefile.in11
-rw-r--r--mail/perdition/files/patch-perdition-db-bdb-perditiondb_bdb.h11
-rw-r--r--mail/perdition/files/patch-perdition-db-ldap-Makefile.in13
-rw-r--r--mail/perdition/files/patch-perdition-db-posix_regex-Makefile.in18
-rw-r--r--mail/perdition/pkg-plist68
22 files changed, 276 insertions, 256 deletions
diff --git a/mail/perdition/Makefile b/mail/perdition/Makefile
index 80fae4783675..d19b508ec79a 100644
--- a/mail/perdition/Makefile
+++ b/mail/perdition/Makefile
@@ -6,35 +6,144 @@
#
PORTNAME= perdition
-PORTVERSION= 0.1.9
+PORTVERSION= 1.11
CATEGORIES= mail net security
MASTER_SITES= http://www.vergenet.net/linux/perdition/download/${PORTVERSION}/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= sheepkiller@cultdeadsheep.org
COMMENT= A POP3 & IMAP4 proxy that can map users to multiple backend servers
LIB_DEPENDS= intl.4:${PORTSDIR}/devel/gettext \
popt.0:${PORTSDIR}/devel/popt \
- gdbm.3:${PORTSDIR}/databases/gdbm \
vanessa_logger.0:${PORTSDIR}/devel/libvanessa_logger \
vanessa_socket.0:${PORTSDIR}/devel/libvanessa_socket \
vanessa_adt.0:${PORTSDIR}/devel/libvanessa_adt
-MAN1= makegdbm.1
MAN5= perditiondb.5
MAN8= perdition.8
+MLINK= perdition.8 - perdition.pop3s.8 \
+ - perdition.imap4.8 - perdition.imap4s.8 \
+ - perdition.imaps.8 - perdition.pop3.8
+
+MANCOMPRESSED= no
USE_LIBTOOL= YES
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
+MAKE_ENV+= DOCSDIR=${DOCSDIR}
+
INSTALLS_SHLIB= yes
-post-extract:
- ${MV} ${WRKSRC}/etc/perdition/perdition.conf \
- ${WRKSRC}/etc/perdition/perdition.conf.sample
- ${MV} ${WRKSRC}/perdition/db/gdbm/popmap \
- ${WRKSRC}/perdition/db/gdbm/popmap.sample
- ${MV} ${WRKSRC}/perdition/db/posix_regex/popmap.re \
- ${WRKSRC}/perdition/db/posix_regex/popmap.re.sample
+# Dirty hack :)
+MYSQL323_LIBVER=10
+MYSQL40_LIBVER= 12
+MYSQL41_LIBVER= 14
+
+MYSQL_VER?= 323
+LDAP_VER?= 21
+
+# Available knobs:
+# WITHOUT_SSL: Disable OpenSSL support
+# WITHOUT_POSIX_REGEX: Disable native regex support
+# WITH_BDB: Enable Berkerley database backend
+# WITH_NIS: Enable NIS database backend
+# WITH_GDBM: Enable gdbm database backend
+# WITH_MYSQL: Enable MySQL database backend
+# WITH_PGSQL: Enable PostgreSQL database backend
+# WITH_OPENLDAP: Enable OpenLDAP database backend
+# WITH_ODBC: Enable ODBC database backend
+
+.if !defined(WITHOUT_SSL)
+CONFIGURE_ARGS+= --enable-ssl
+USE_OPENSSL= yes
+.else
+CONFIGURE_ARGS+= --disable-ssl
+.endif
+
+.if !defined(WITHOUT_POSIX_REGEX)
+CONFIGURE_ARGS+= --enable-posix_regex
+PLIST_SUB+= POSIX_REGEX=""
+.else
+CONFIGURE_ARGS+= --disable-posix_regex
+PLIST_SUB+= POSIX_REGEX="@comment "
+.endif
+
+.if defined(WITH_BDB)
+CONFIGURE_ARGS+= --enable-bdb
+PLIST_SUB+= BDB=""
+LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3
+MAN1+= makebdb.1
+.else
+CONFIGURE_ARGS+= --disable-bdb
+PLIST_SUB+= BDB="@comment "
+.endif
+
+.if defined(WITH_NIS)
+CONFIGURE_ARGS+= --enable-nis
+PLIST_SUB+= NIS=""
+.else
+CONFIGURE_ARGS+= --disable-nis
+PLIST_SUB+= NIS="@comment "
+.endif
+
+.if defined(WITH_GDBM)
+CONFIGURE_ARGS+= --enable-gdbm
+LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
+PLIST_SUB+= GDBM=""
+MAN1+= makegdbm.1
+.else
+CONFIGURE_ARGS+= --disable-gdbm
+PLIST_SUB+= GDBM="@comment "
+.endif
+
+.if defined(WITH_MYSQL)
+CONFIGURE_ARGS+= --enable-mysql
+LIB_DEPENDS+= mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
+PLIST_SUB+= MYSQL=""
+MAN8+= perditiondb_mysql_makedb.8
+.else
+CONFIGURE_ARGS+= --disable-mysql
+PLIST_SUB+= MYSQL="@comment "
+.endif
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --enable-pg
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+PLIST_SUB+= PGSQL=""
+MAN8+= perditiondb_postgresql_makedb.8
+.else
+CONFIGURE_ARGS+= --disable-pg
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+.if defined(WITH_OPENLDAP)
+CONFIGURE_ARGS+= --enable-ldap --with-ldap-schema-directory=${LOCALBASE}/etc/openldap/schema/
+LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap${LDAP_VER}
+PLIST_SUB+= OPENLDAP=""
+MAN8+= perditiondb_ldap_makedb.8
+.else
+CONFIGURE_ARGS+= --disable-ldap
+PLIST_SUB+= OPENLDAP="@comment "
+.endif
+
+.if defined(WITH_ODBC)
+CONFIGURE_ARGS+= --enable-odbc
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+PLIST_SUB+= ODBC=""
+MAN8+= perditiondb_odbc_makedb.8
+.else
+CONFIGURE_ARGS+= --disable-odbc
+PLIST_SUB+= ODBC="@comment "
+.endif
+
+post-install:
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/etc/pam.d/perdition ${DOCSDIR}/perdition-pam.sample
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "/********************************************************/"
+ @${ECHO_MSG} " If you want to use PAM with perdition, have a look at :"
+ @${ECHO_MSG} " ${DOCSDIR}/perdition-pam.sample"
+ @${ECHO_MSG} "/********************************************************/"
+ @${ECHO_MSG} ""
.include <bsd.port.mk>
diff --git a/mail/perdition/distinfo b/mail/perdition/distinfo
index 85890d570cd5..9276fb41916b 100644
--- a/mail/perdition/distinfo
+++ b/mail/perdition/distinfo
@@ -1 +1 @@
-MD5 (perdition-0.1.9.tar.gz) = 504213f33dd23d3436ccee5cbc4e7817
+MD5 (perdition-1.11.tar.gz) = 4499246c5380a843b1f2e7da0aecc0eb
diff --git a/mail/perdition/files/patch-aa b/mail/perdition/files/patch-aa
deleted file mode 100644
index 6c0cabeaf062..000000000000
--- a/mail/perdition/files/patch-aa
+++ /dev/null
@@ -1,19 +0,0 @@
-*** etc/perdition/Makefile.am.orig Sun Apr 29 00:29:58 2001
---- etc/perdition/Makefile.am Sun Apr 29 00:30:52 2001
-***************
-*** 23,29 ****
- #
- ######################################################################
-
-! EXTRA_DIST = perdition.conf
-
- perditionconfdir = $(sysconfdir)/perdition
-! perditionconf_DATA = perdition.conf
---- 23,29 ----
- #
- ######################################################################
-
-! EXTRA_DIST = perdition.conf.sample
-
- perditionconfdir = $(sysconfdir)/perdition
-! perditionconf_DATA = perdition.conf.sample
diff --git a/mail/perdition/files/patch-ab b/mail/perdition/files/patch-ab
deleted file mode 100644
index 1f56cb752af3..000000000000
--- a/mail/perdition/files/patch-ab
+++ /dev/null
@@ -1,25 +0,0 @@
-*** etc/perdition/Makefile.in.orig Sun Apr 29 00:56:52 2001
---- etc/perdition/Makefile.in Sun Apr 29 00:57:22 2001
-***************
-*** 115,124 ****
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = perdition.conf
-
- perditionconfdir = $(sysconfdir)/perdition
-! perditionconf_DATA = perdition.conf
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = ../../config.h
- CONFIG_CLEAN_FILES =
---- 115,124 ----
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = perdition.conf.sample
-
- perditionconfdir = $(sysconfdir)/perdition
-! perditionconf_DATA = perdition.conf.sample
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = ../../config.h
- CONFIG_CLEAN_FILES =
diff --git a/mail/perdition/files/patch-ac b/mail/perdition/files/patch-ac
deleted file mode 100644
index fb07a4eb2af4..000000000000
--- a/mail/perdition/files/patch-ac
+++ /dev/null
@@ -1,19 +0,0 @@
-*** etc/Makefile.am.orig Sun Apr 29 00:31:48 2001
---- etc/Makefile.am Sun Apr 29 00:32:01 2001
-***************
-*** 23,29 ****
- #
- ######################################################################
-
-! SUBDIRS = perdition @pam_dir@ rc.d sysconfig
-
- EXTRA_DIST =
-
---- 23,29 ----
- #
- ######################################################################
-
-! SUBDIRS = perdition @pam_dir@
-
- EXTRA_DIST =
-
diff --git a/mail/perdition/files/patch-ad b/mail/perdition/files/patch-ad
deleted file mode 100644
index fdbcb29af6a8..000000000000
--- a/mail/perdition/files/patch-ad
+++ /dev/null
@@ -1,19 +0,0 @@
-*** etc/Makefile.in.orig Sun Apr 29 00:59:15 2001
---- etc/Makefile.in Sun Apr 29 00:59:23 2001
-***************
-*** 115,121 ****
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! SUBDIRS = perdition @pam_dir@ rc.d sysconfig
-
- EXTRA_DIST =
-
---- 115,121 ----
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! SUBDIRS = perdition @pam_dir@
-
- EXTRA_DIST =
-
diff --git a/mail/perdition/files/patch-ae b/mail/perdition/files/patch-ae
deleted file mode 100644
index de42de09cb54..000000000000
--- a/mail/perdition/files/patch-ae
+++ /dev/null
@@ -1,25 +0,0 @@
-*** perdition/db/gdbm/Makefile.am.orig Sun Apr 29 00:34:26 2001
---- perdition/db/gdbm/Makefile.am Sun Apr 29 00:35:37 2001
-***************
-*** 23,32 ****
- #
- ######################################################################
-
-! EXTRA_DIST = popmap Makefile.popmap.in Makefile.popmap
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap Makefile.popmap
-
- install-data-hook:
- (cd $(DESTDIR)$(sysconfdir)/perdition/ && ln -sf Makefile.popmap Makefile)
---- 23,32 ----
- #
- ######################################################################
-
-! EXTRA_DIST = popmap.sample Makefile.popmap.in Makefile.popmap
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.sample Makefile.popmap
-
- install-data-hook:
- (cd $(DESTDIR)$(sysconfdir)/perdition/ && ln -sf Makefile.popmap Makefile)
diff --git a/mail/perdition/files/patch-af b/mail/perdition/files/patch-af
deleted file mode 100644
index aa6f9effe18f..000000000000
--- a/mail/perdition/files/patch-af
+++ /dev/null
@@ -1,25 +0,0 @@
-*** perdition/db/gdbm/Makefile.in.orig Sun Apr 29 01:00:08 2001
---- perdition/db/gdbm/Makefile.in Sun Apr 29 01:00:36 2001
-***************
-*** 115,124 ****
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = popmap Makefile.popmap.in Makefile.popmap
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap Makefile.popmap
-
- lib_LTLIBRARIES = libperditiondb_gdbm.la
-
---- 115,124 ----
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = popmap.sample Makefile.popmap.in Makefile.popmap
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.sample Makefile.popmap
-
- lib_LTLIBRARIES = libperditiondb_gdbm.la
-
diff --git a/mail/perdition/files/patch-ag b/mail/perdition/files/patch-ag
deleted file mode 100644
index 5b2362b74238..000000000000
--- a/mail/perdition/files/patch-ag
+++ /dev/null
@@ -1,25 +0,0 @@
-*** perdition/db/posix_regex/Makefile.am.orig Sun Apr 29 00:36:56 2001
---- perdition/db/posix_regex/Makefile.am Sun Apr 29 00:37:17 2001
-***************
-*** 24,33 ****
- #
- ######################################################################
-
-! EXTRA_DIST = popmap.re
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.re
-
- lib_LTLIBRARIES = libperditiondb_posix_regex.la
-
---- 24,33 ----
- #
- ######################################################################
-
-! EXTRA_DIST = popmap.re.sample
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.re.sample
-
- lib_LTLIBRARIES = libperditiondb_posix_regex.la
-
diff --git a/mail/perdition/files/patch-ah b/mail/perdition/files/patch-ah
deleted file mode 100644
index eeb3590a4505..000000000000
--- a/mail/perdition/files/patch-ah
+++ /dev/null
@@ -1,25 +0,0 @@
-*** perdition/db/posix_regex/Makefile.in.orig Sun Apr 29 01:01:11 2001
---- perdition/db/posix_regex/Makefile.in Sun Apr 29 01:01:24 2001
-***************
-*** 116,125 ****
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = popmap.re
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.re
-
- lib_LTLIBRARIES = libperditiondb_posix_regex.la
-
---- 116,125 ----
- resolv_lib = @resolv_lib@
- socket_lib = @socket_lib@
-
-! EXTRA_DIST = popmap.re.sample
-
- confdir = $(sysconfdir)/perdition
-! conf_DATA = popmap.re.sample
-
- lib_LTLIBRARIES = libperditiondb_posix_regex.la
-
diff --git a/mail/perdition/files/patch-ai b/mail/perdition/files/patch-ai
deleted file mode 100644
index 9d30d39a65ca..000000000000
--- a/mail/perdition/files/patch-ai
+++ /dev/null
@@ -1,24 +0,0 @@
---- perdition/str.c.orig Sun Apr 21 04:10:48 2002
-+++ perdition/str.c Sun Apr 21 04:13:22 2002
-@@ -35,7 +35,6 @@
- #include <stdlib.h>
- #include <stdarg.h>
- #include <unistd.h>
--#include <printf.h>
- #include <sys/uio.h>
- #include <vanessa_socket.h>
-
-@@ -96,13 +95,6 @@
-
- extern options_t opt;
- extern vanessa_logger_t *perdition_vl;
--
-- if((fmt_args=parse_printf_format(fmt, 0, NULL)) != nargs){
-- PERDITION_DEBUG_UNSAFE(
-- "nargs and fmt missmatch: %d args requested, %d args in format", nargs,
-- fmt_args);
-- return(-1);
-- }
-
- va_start(ap, fmt);
- if((bytes=vsnprintf(__str_write_buf, STR_WRITE_BUF_LEN-2, fmt, ap))<0){
diff --git a/mail/perdition/files/patch-aj b/mail/perdition/files/patch-aj
deleted file mode 100644
index 2482502707f8..000000000000
--- a/mail/perdition/files/patch-aj
+++ /dev/null
@@ -1,10 +0,0 @@
---- perdition/username.h.orig Sun Apr 21 04:16:49 2002
-+++ perdition/username.h Sun Apr 21 04:16:57 2002
-@@ -29,6 +29,7 @@
- #ifndef USERNAME_BERT
- #define USERNAME_BERT
-
-+#include <sys/types.h>
- #include <netinet/in.h>
-
- /**********************************************************************
diff --git a/mail/perdition/files/patch-ak b/mail/perdition/files/patch-ak
deleted file mode 100644
index 9e4e3f3490a2..000000000000
--- a/mail/perdition/files/patch-ak
+++ /dev/null
@@ -1,11 +0,0 @@
---- perdition/pam.h.orig Sat Dec 21 01:36:10 2002
-+++ perdition/pam.h Sat Dec 21 01:36:12 2002
-@@ -37,6 +37,8 @@
-
- #ifdef WITH_PAM_SUPPORT
-
-+#include <stddef.h>
-+
- #ifdef HAVE_SECURITY_PAM_MISC_H
- #include <security/pam_misc.h>
- #endif /* HAVE_SECURITY_PAM_MISC_H */
diff --git a/mail/perdition/files/patch-etc-Makefile.in b/mail/perdition/files/patch-etc-Makefile.in
new file mode 100644
index 000000000000..6598f65e53de
--- /dev/null
+++ b/mail/perdition/files/patch-etc-Makefile.in
@@ -0,0 +1,11 @@
+--- etc/Makefile.in.orig Sun Jun 15 21:50:02 2003
++++ etc/Makefile.in Sun Jun 15 21:50:18 2003
+@@ -136,7 +136,7 @@
+ ssl_includes = @ssl_includes@
+ ssl_lib = @ssl_lib@
+
+-SUBDIRS = perdition @pam_dir@ rc.d sysconfig
++SUBDIRS = perdition
+
+ EXTRA_DIST =
+
diff --git a/mail/perdition/files/patch-etc-perdition-Makefile.in b/mail/perdition/files/patch-etc-perdition-Makefile.in
new file mode 100644
index 000000000000..d46c01ec9e5b
--- /dev/null
+++ b/mail/perdition/files/patch-etc-perdition-Makefile.in
@@ -0,0 +1,18 @@
+--- etc/perdition/Makefile.in.orig Sun Jun 15 19:07:06 2003
++++ etc/perdition/Makefile.in Sun Jun 15 19:07:13 2003
+@@ -169,11 +169,11 @@
+ $(mkinstalldirs) $(DESTDIR)$(perditionconfdir)
+ @list='$(perditionconf_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perditionconfdir)/$$p"; \
+- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perditionconfdir)/$$p; \
++ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perditionconfdir)/$$p-dist"; \
++ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perditionconfdir)/$$p-dist; \
+ else if test -f $$p; then \
+- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(perditionconfdir)/$$p"; \
+- $(INSTALL_DATA) $$p $(DESTDIR)$(perditionconfdir)/$$p; \
++ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(perditionconfdir)/$$p-dist"; \
++ $(INSTALL_DATA) $$p $(DESTDIR)$(perditionconfdir)/$$p-dist; \
+ fi; fi; \
+ done
+
diff --git a/mail/perdition/files/patch-makebdb-Makefile.in b/mail/perdition/files/patch-makebdb-Makefile.in
new file mode 100644
index 000000000000..72a418893844
--- /dev/null
+++ b/mail/perdition/files/patch-makebdb-Makefile.in
@@ -0,0 +1,11 @@
+--- makebdb/Makefile.in.orig Sun Jun 15 18:30:18 2003
++++ makebdb/Makefile.in Sun Jun 15 18:30:35 2003
+@@ -145,7 +145,7 @@
+ makebdb_SOURCES = makebdb.c options.c options.h
+
+
+-makebdb_LDADD = -L../libjain -L../libjain/.libs/ -ljain -ldb -lpopt @dmalloc_lib@
++makebdb_LDADD = -L../libjain -L../libjain/.libs/ -ljain -ldb3 -lpopt @dmalloc_lib@
+
+
+ INCLUDES = -I$(top_srcdir)/libjain
diff --git a/mail/perdition/files/patch-makebdb-makebdb.c b/mail/perdition/files/patch-makebdb-makebdb.c
new file mode 100644
index 000000000000..c976a51c864b
--- /dev/null
+++ b/mail/perdition/files/patch-makebdb-makebdb.c
@@ -0,0 +1,11 @@
+--- makebdb/makebdb.c.orig Mon Apr 28 08:13:47 2003
++++ makebdb/makebdb.c Sun Jun 15 18:36:21 2003
+@@ -35,7 +35,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+-#include <db.h>
++#include <db3/db.h>
+
+ #include "options.h"
+
diff --git a/mail/perdition/files/patch-perdition-db-bdb-Makefile.in b/mail/perdition/files/patch-perdition-db-bdb-Makefile.in
new file mode 100644
index 000000000000..e8f6475249f2
--- /dev/null
+++ b/mail/perdition/files/patch-perdition-db-bdb-Makefile.in
@@ -0,0 +1,11 @@
+--- perdition/db/bdb/Makefile.in.orig Sun Jun 15 18:42:41 2003
++++ perdition/db/bdb/Makefile.in Sun Jun 15 18:42:58 2003
+@@ -143,7 +143,7 @@
+
+ libperditiondb_bdb_la_LDFLAGS = -version-info 0:0:0
+
+-libperditiondb_bdb_la_LIBADD = -ldb
++libperditiondb_bdb_la_LIBADD = -ldb3
+
+ INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/perdition -I$(top_srcdir)/libjain -DPERDITIONDB_BDB_SYSCONFDIR=\"$(sysconfdir)/perdition\" @ssl_includes@
+
diff --git a/mail/perdition/files/patch-perdition-db-bdb-perditiondb_bdb.h b/mail/perdition/files/patch-perdition-db-bdb-perditiondb_bdb.h
new file mode 100644
index 000000000000..5ae7e6598c7a
--- /dev/null
+++ b/mail/perdition/files/patch-perdition-db-bdb-perditiondb_bdb.h
@@ -0,0 +1,11 @@
+--- perdition/db/bdb/perditiondb_bdb.h.orig Sun Jun 15 18:38:52 2003
++++ perdition/db/bdb/perditiondb_bdb.h Sun Jun 15 18:39:05 2003
+@@ -29,7 +29,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+-#include <db.h>
++#include <db3/db.h>
+ #include "log.h"
+
+ #ifndef PERDITIONDB_BDB_SYSCONFDIR
diff --git a/mail/perdition/files/patch-perdition-db-ldap-Makefile.in b/mail/perdition/files/patch-perdition-db-ldap-Makefile.in
new file mode 100644
index 000000000000..1965d3dfe769
--- /dev/null
+++ b/mail/perdition/files/patch-perdition-db-ldap-Makefile.in
@@ -0,0 +1,13 @@
+--- ./perdition/db/ldap/Makefile.in.orig Sun Jun 15 21:21:13 2003
++++ ./perdition/db/ldap/Makefile.in Sun Jun 15 21:22:09 2003
+@@ -550,8 +550,8 @@
+ "$(DESTDIR)@ldap_schemadir@"; \
+ fi; \
+ if test -w "$(DESTDIR)@ldap_schemadir@"; then \
+- install -m644 $< \
+- "$(DESTDIR)@ldap_schemadir@/perdition.schema";\
++ install -m644 $(schema_sources) \
++ "$(DESTDIR)@ldap_schemadir@/perdition.schema-dist";\
+ fi \
+ fi
+
diff --git a/mail/perdition/files/patch-perdition-db-posix_regex-Makefile.in b/mail/perdition/files/patch-perdition-db-posix_regex-Makefile.in
new file mode 100644
index 000000000000..7c8921ddbe1b
--- /dev/null
+++ b/mail/perdition/files/patch-perdition-db-posix_regex-Makefile.in
@@ -0,0 +1,18 @@
+--- perdition/db/posix_regex/Makefile.in.orig Sun Jun 15 21:54:10 2003
++++ perdition/db/posix_regex/Makefile.in Sun Jun 15 21:55:04 2003
+@@ -270,11 +270,11 @@
+ $(mkinstalldirs) $(DESTDIR)$(confdir)
+ @list='$(conf_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(confdir)/$$p"; \
+- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(confdir)/$$p; \
++ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(confdir)/$$p-dist"; \
++ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(confdir)/$$p-dist; \
+ else if test -f $$p; then \
+- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(confdir)/$$p"; \
+- $(INSTALL_DATA) $$p $(DESTDIR)$(confdir)/$$p; \
++ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(confdir)/$$p-dist"; \
++ $(INSTALL_DATA) $$p $(DESTDIR)$(confdir)/$$p-dist; \
+ fi; fi; \
+ done
+
diff --git a/mail/perdition/pkg-plist b/mail/perdition/pkg-plist
index 48e89d53cd08..f95ddbd5541d 100644
--- a/mail/perdition/pkg-plist
+++ b/mail/perdition/pkg-plist
@@ -1,25 +1,59 @@
-bin/makegdbm
-etc/pam.d/perdition
-etc/perdition/popmap.sample
-etc/perdition/Makefile.popmap
+%%GDBM%%bin/makegdbm
+%%BDB%%bin/makebdb
+%%OPENLDAP%%bin/perditiondb_ldap_makedb
+%%ODBC%%bin/perditiondb_odbc_makedb
+%%MYSQL%%bin/perditiondb_mysql_makedb
+%%PGSQL%%bin/perditiondb_postgresql_makedb
+%%POSIX_REGEX%%etc/perdition/popmap.re-dist
+etc/perdition/perdition.conf-dist
+etc/perdition/popmap-dist
+etc/perdition/Makefile.popmap-dist
etc/perdition/Makefile
-etc/perdition/README.perditiondb_nis
-etc/perdition/popmap.re.sample
-etc/perdition/perdition.conf.sample
include/jain.h
lib/libjain.so.0
lib/libjain.so
+lib/libjain.la
lib/libjain.a
-lib/libperditiondb_gdbm.so.0
-lib/libperditiondb_gdbm.so
-lib/libperditiondb_gdbm.a
-lib/libperditiondb_nis.so.0
-lib/libperditiondb_nis.so
-lib/libperditiondb_nis.a
-lib/libperditiondb_posix_regex.so.0
-lib/libperditiondb_posix_regex.so
-lib/libperditiondb_posix_regex.a
+%%GDBM%%lib/libperditiondb_gdbm.so.0
+%%GDBM%%lib/libperditiondb_gdbm.so
+%%GDBM%%lib/libperditiondb_gdbm.la
+%%GDBM%%lib/libperditiondb_gdbm.a
+%%BDB%%lib/libperditiondb_bdb.so.0
+%%BDB%%lib/libperditiondb_bdb.so
+%%BDB%%lib/libperditiondb_bdb.la
+%%BDB%%lib/libperditiondb_bdb.a
+%%OPENLDAP%%lib/libperditiondb_ldap.so.0
+%%OPENLDAP%%lib/libperditiondb_ldap.so
+%%OPENLDAP%%lib/libperditiondb_ldap.la
+%%OPENLDAP%%lib/libperditiondb_ldap.a
+%%ODBC%%lib/libperditiondb_odbc.so.0
+%%ODBC%%lib/libperditiondb_odbc.so
+%%ODBC%%lib/libperditiondb_odbc.la
+%%ODBC%%lib/libperditiondb_odbc.a
+%%MYSQL%%lib/libperditiondb_mysql.so.0
+%%MYSQL%%lib/libperditiondb_mysql.so
+%%MYSQL%%lib/libperditiondb_mysql.la
+%%MYSQL%%lib/libperditiondb_mysql.a
+%%NIS%%lib/libperditiondb_nis.so.0
+%%NIS%%lib/libperditiondb_nis.so
+%%NIS%%lib/libperditiondb_nis.la
+%%NIS%%lib/libperditiondb_nis.a
+%%PGSQL%%lib/libperditiondb_postgresql.so.0
+%%PGSQL%%lib/libperditiondb_postgresql.so
+%%PGSQL%%lib/libperditiondb_postgresql.la
+%%PGSQL%%lib/libperditiondb_postgresql.a
+%%POSIX_REGEX%%lib/libperditiondb_posix_regex.so.0
+%%POSIX_REGEX%%lib/libperditiondb_posix_regex.so
+%%POSIX_REGEX%%lib/libperditiondb_posix_regex.la
+%%POSIX_REGEX%%lib/libperditiondb_posix_regex.a
sbin/perdition
sbin/perdition.pop3
+sbin/perdition.pop3s
sbin/perdition.imap4
-@dirrm etc/perdition
+sbin/perdition.imap4s
+sbin/perdition.imaps
+share/doc/perdition/perdition-pam.sample
+@unexec rmdir %D/etc/perdition 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/etc/perdition`` to remove any files left." | fmt
+@dirrm share/doc/perdition
+@exec /sbin/ldconfig -m %D/lib
+@unexec /sbin/ldconfig -R %D/lib