1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- update to 3.0.2

- pass maintainership to submitter
- add LICENSE
- drop optional dependencies on database backends - since 3.0 it's
  handled with libzdb
- rename rc-scripts to .sh-less ones
- add UPDATING entry for users, that want to stay with dbmail 2.2.x

Please note, that committed patch is reworked version of originally
submitted (missing deps added, rc-scripts renamed, NOPORTDOCS issue
handled more completely, some plist fixes applied). Sorry for delay.

PR:		164631
Submitted by:	Alan Hicks <ahicks at p-o.co dot uk>
Feature safe:	yes
This commit is contained in:
Ruslan Makhmatkhanov 2012-03-18 19:17:12 +00:00
parent 44046d0943
commit 336a64246a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293530
10 changed files with 123 additions and 157 deletions

View File

@ -5,6 +5,24 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20120318:
AFFECTS: users of mail/dbmail
AUTHOR: rm@FreeBSD.org
dbmail 3.0 is now available.
There are a number of significant changes including Dependencies,
Config, Schema and Server changes.
Without required modifications, dbmail will not run and you will
no longer have access to your emails. See UPGRADING for details.
Don't forget to backup and fully test before upgrading.
To stick with version 2.2.x run:
# portupgrade -o mail/dbmail22 mail/dbmail
or
# portmaster -o mail/dbmail22 mail/dbmail
20120313:
AFFECTS: users of x11-toolkits/qt4-gui
AUTHOR: kde@FreeBSD.org

View File

@ -6,50 +6,57 @@
#
PORTNAME= dbmail
PORTVERSION= 2.2.17
PORTVERSION= 3.0.2
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.2/
MASTER_SITES= http://www.dbmail.org/download/3.0/
MAINTAINER= ports@FreeBSD.org
MAINTAINER= ahicks@p-o.co.uk
COMMENT= An SQL database-based mail system (POP3 and IMAP)
LIB_DEPENDS= gmime-2.0.4:${PORTSDIR}/mail/gmime2
LICENSE= GPLv2
CONFLICTS= dbmail-*-2.0.* dbmail-2.1.*
.if !defined(NOPORTDOCS)
BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc \
xmlto:${PORTSDIR}/textproc/xmlto
.endif
LIB_DEPENDS= gmime-2.4:${PORTSDIR}/mail/gmime24 \
zdb.8:${PORTSDIR}/databases/libzdb \
mhash.2:${PORTSDIR}/security/mhash \
event-1.4:${PORTSDIR}/devel/libevent
OPTIONS= MYSQL "Build with MySQL support" on \
POSTGRESQL "Build with PostgreSQL support" off \
SQLITE "Build with SQLite support" off \
SIEVE "Build w. support for Sieve mail sorting language" off \
LDAP "Build with support for LDAP authentication" off
CONFLICTS= dbmail-*-2.0.* dbmail-2.*
OPTIONS= SIEVE "Build with support for Sieve mail sorting language" off \
LDAP "Build with support for LDAP authentication" off
USE_AUTOTOOLS= libtool
USE_GMAKE= YES
USE_GMAKE= yes
USE_LDCONFIG= ${PREFIX}/lib/dbmail
USE_RC_SUBR= dbmail-pop3d.sh dbmail-lmtpd.sh dbmail-imapd.sh dbmail-timsieved.sh
USE_GNOME= glib20 pkgconfig
USE_OPENSSL= YES
USE_RC_SUBR= dbmail-pop3d dbmail-lmtpd dbmail-imapd dbmail-timsieved
USE_OPENSSL= yes
CFLAGS+= -fPIC -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CONFIGURE_ENV+= LOCALBASE=${LOCALBASE}
CONFIGURE_ARGS+= --with-pkglibdir=${LOCALBASE}/lib/dbmail
CONFIGURE_ARGS+= --with-zdb=${LOCALBASE} --sysconfdir=${LOCALBASE}/etc
MAKE_ARGS+= mandir=${MANPREFIX}/man
PORTDOCS= AUTHORS BUGS COPYING INSTALL NEWS README \
README.aliases README.exim README.ldap \
README.postfix README.qmail README.sieve \
README.smtp README.solaris README.usermap \
THANKS
MAN1= dbmail-smtp.1 dbmail.1
PORTDOCS= AUTHORS BUGS INSTALL THANKS UPGRADING
.if !defined(NOPORTDOCS)
MAN1= dbmail-deliver.1 dbmail.1
MAN5= dbmail.conf.5
MAN8= dbmail-export.8 dbmail-imapd.8 dbmail-lmtpd.8 \
dbmail-pop3d.8 dbmail-sievecmd.8 dbmail-timsieved.8 \
dbmail-users.8 dbmail-util.8
MANCOMPRESSED= no
SUB_FILES= pkg-message
MAN8= dbmail-export.8 dbmail-httpd.8 dbmail-imapd.8 \
dbmail-lmtpd.8 dbmail-pop3d.8 dbmail-sievecmd.8 \
dbmail-timsieved.8 dbmail-users.8 dbmail-util.8
.endif
DBMAIL_USER?= mailnull
DBMAIL_GROUP?= mail
PIDDIR?= /var/run/dbmail
PLIST_SUB+= DBMAIL_USER="${DBMAIL_USER}" \
DBMAIL_GROUP="${DBMAIL_GROUP}" \
PIDDIR="${PIDDIR}"
PLIST_SUB+= PORTNAME=${PORTNAME}
.if defined(NOPORTDOCS)
PLIST_SUB+= PORTDOCS="@comment "
.else
@ -58,35 +65,8 @@ PLIST_SUB+= PORTDOCS=""
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_MYSQL)
CONFIGURE_ARGS+=--with-mysql
USE_MYSQL= YES
DATABASE+= mysql
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_POSTGRESQL)
CONFIGURE_ARGS+=--with-pgsql
USE_PGSQL= yes
DATABASE+= postgresql
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif
.if defined(WITH_SQLITE)
CONFIGURE_ARGS+=--with-sqlite
USE_SQLITE= yes
DATABASE+= sqlite
PLIST_SUB+= SQLITE=""
.else
PLIST_SUB+= SQLITE="@comment "
.endif
.if defined(WITH_SIEVE)
CONFIGURE_ARGS+=--with-sieve=${LOCALBASE}/include
CONFIGURE_ARGS+=--with-sieve=${LOCALBASE}
LIB_DEPENDS+= sieve.1:${PORTSDIR}/mail/libsieve
PLIST_SUB+= SIEVE=""
.else
@ -94,47 +74,34 @@ PLIST_SUB+= SIEVE="@comment "
.endif
.if defined(WITH_LDAP)
CONFIGURE_ARGS+=--with-auth-ldap=${LOCALBASE}/include
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
USE_OPENLDAP= yes
PLIST_SUB+= LDAP=""
.else
PLIST_SUB+= LDAP="@comment "
.endif
.if defined(WITHOUT_MYSQL) && !defined(WITH_POSTGRESQL) && !defined(WITH_SQLITE)
IGNORE= requires at least one database backend selected. Run 'make config'
.if !defined(NOPORTDOCS)
CONFIGURE_ARGS+= --enable-manpages
.endif
post-patch:
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
# remove leftovers which are not removed by some revisions of port
# fixes the `Shared object "libpgsqldbmail.so.0" not found, required by "libdbmail.so.0"' error.
pre-install:
@for f in 'a' 'la' 'so' 'so.0'; do \
if [ -f ${PREFIX}/lib/libdbmail.$$f ] ; then \
${RM} ${PREFIX}/lib/libdbmail.$$f; \
fi; \
done
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@if [ ! -f ${PREFIX}/etc/dbmail.conf ] ; then \
${CP} -p ${PREFIX}/etc/dbmail.conf-dist ${PREFIX}/etc/dbmail.conf; \
${CP} -p ${PREFIX}/etc/dbmail.conf-dist ${PREFIX}/etc/dbmail.conf; \
fi
@${MKDIR} ${DATADIR}
@for f in ${DATABASE}; do \
${MKDIR} ${DATADIR}/$$f ; \
${INSTALL_DATA} ${WRKSRC}/sql/$$f/* ${DATADIR}/$$f; \
${INSTALL_DATA} ${WRKSRC}/dbmail.schema ${DATADIR}
@for f in mysql oracle postgresql sqlite; do \
${MKDIR} ${DATADIR}/$$f ; \
${INSTALL_DATA} ${WRKSRC}/sql/$$f/* ${DATADIR}/$$f; \
done
@${MKDIR} ${PIDDIR}
@${CHOWN} ${DBMAIL_USER}:${DBMAIL_GROUP} ${PIDDIR}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} * ${DOCSDIR})
.endif
@${CAT} ${PKGMESSAGE}

View File

@ -1,2 +1,2 @@
SHA256 (dbmail-2.2.17.tar.gz) = 11d457b0114047185aff4249afb6b91baf843b393e73ecbb147549960d7eaefd
SIZE (dbmail-2.2.17.tar.gz) = 896838
SHA256 (dbmail-3.0.2.tar.gz) = 139558f4fa3e0f460d688f6d29318366cc3f40dd570a1a29484bb580d0190c3e
SIZE (dbmail-3.0.2.tar.gz) = 867560

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
# $FreeBSD: /tmp/pcvs/ports/mail/dbmail/files/dbmail-imapd.in,v 1.1 2012-03-18 19:17:12 rm Exp $
#
# PROVIDE: dbmail-imapd
@ -22,7 +22,7 @@ name=dbmail_imapd
rcvar=dbmail_imapd_enable
command=%%PREFIX%%/sbin/dbmail-imapd
pidfile=/var/run/dbmail-imapd.pid
pidfile=/var/run/dbmail/dbmail-imapd.pid
required_files=%%PREFIX%%/etc/dbmail.conf
# read settings, set default values

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
# $FreeBSD: /tmp/pcvs/ports/mail/dbmail/files/dbmail-lmtpd.in,v 1.1 2012-03-18 19:17:12 rm Exp $
#
# PROVIDE: dbmail-lmtpd
@ -22,7 +22,7 @@ name=dbmail_lmtpd
rcvar=dbmail_lmtpd_enable
command=%%PREFIX%%/sbin/dbmail-lmtpd
pidfile=/var/run/dbmail-lmtpd.pid
pidfile=/var/run/dbmail/dbmail-lmtpd.pid
required_files=%%PREFIX%%/etc/dbmail.conf
# read settings, set default values

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
# $FreeBSD: /tmp/pcvs/ports/mail/dbmail/files/dbmail-pop3d.in,v 1.1 2012-03-18 19:17:12 rm Exp $
#
# PROVIDE: dbmail-pop3d
@ -22,7 +22,7 @@ name=dbmail_pop3d
rcvar=dbmail_pop3d_enable
command=%%PREFIX%%/sbin/dbmail-pop3d
pidfile=/var/run/dbmail-pop3d.pid
pidfile=/var/run/dbmail/dbmail-pop3d.pid
required_files=%%PREFIX%%/etc/dbmail.conf
# read settings, set default values

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
# $FreeBSD: /tmp/pcvs/ports/mail/dbmail/files/dbmail-timsieved.in,v 1.1 2012-03-18 19:17:12 rm Exp $
#
# PROVIDE: dbmail-timsieved
@ -19,10 +19,10 @@
. /etc/rc.subr
name=dbmail_timsieved
rcvar=dbmail_timsieved_enable
rcvar=dbmail-timsieved_enable
command=%%PREFIX%%/sbin/dbmail-timsieved
pidfile=/var/run/dbmail-timsieved.pid
pidfile=/var/run/dbmail/dbmail-timsieved.pid
required_files=%%PREFIX%%/etc/dbmail.conf
# read settings, set default values

View File

@ -1,29 +0,0 @@
IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!
*) Don't forget to update the database using a script from
%%DATADIR%%/
*) Many programs have been renamed and their arguments changed.
*) Read the upgrading notes.
*) Don't be careless with this upgrade or mail will be lost!
*) dbmail can be controled by setting dbmail_imapd_enable,
dbmail_lmtpd_enable, and/or dbmail_pop3d_enable in
/etc/rc.conf.
NOTE FOR ADMINS UPGRADING FROM 2.0.X -> 2.2.X :
*) Update database using a script
%%DATADIR%%/mysql/migrate_from_2.0_to_2.2.mysql or
%%DATADIR%%/postgresql/migrate_from_2.0_to_2.2.pgsql
*) Run `dbmail-util -by'
*) Edit configuration file
`[DBMAIL]' section must have `driver=mysql/pgsql' and
`authdriver=sql/ldap'.
NOTE FOR ADMINS UPGRADING FROM 2.1.X -> 2.2 :
*) Update database using a script
%%DATADIR%%/mysql/2_1_7-2_2_0.mysql (if you're using MySQL)
%%DATADIR%%/postgresql/2_1_7-2_2_0.pgsql (PostgreSQL)
%%DATADIR%%/sqlite/2_1_7-2_2_0.sqlite (SQLite3)
*) Run `dbmail-util -by'

View File

@ -21,4 +21,4 @@ PostgreSQL or SQLite).
Changes on a Dbmail system (adding of users, changing passwords etc.) are
effective immediately.
WWW: http://www.dbmail.org/
WWW: http://www.dbmail.org/

View File

@ -1,7 +1,6 @@
@unexec if cmp -s %D/etc/dbmail.conf-dist %D/etc/dbmail.conf; then rm -f %D/etc/dbmail.conf; fi
etc/dbmail.conf-dist
@exec if [ ! -f %D/etc/dbmail.conf ] ; then cp -p %D/%F %B/dbmail.conf; fi
@exec mkdir -p %D/lib/dbmail
%%LDAP%%lib/dbmail/libauth_ldap.a
%%LDAP%%lib/dbmail/libauth_ldap.la
%%LDAP%%lib/dbmail/libauth_ldap.so
@ -14,48 +13,59 @@ lib/dbmail/libdbmail.a
lib/dbmail/libdbmail.la
lib/dbmail/libdbmail.so
lib/dbmail/libdbmail.so.0
%%MYSQL%%lib/dbmail/libmysql.a
%%MYSQL%%lib/dbmail/libmysql.la
%%MYSQL%%lib/dbmail/libmysql.so
%%MYSQL%%lib/dbmail/libmysql.so.0
%%PGSQL%%lib/dbmail/libpgsql.a
%%PGSQL%%lib/dbmail/libpgsql.la
%%PGSQL%%lib/dbmail/libpgsql.so
%%PGSQL%%lib/dbmail/libpgsql.so.0
%%SIEVE%%lib/dbmail/libsort_sieve.a
%%SIEVE%%lib/dbmail/libsort_sieve.la
%%SIEVE%%lib/dbmail/libsort_sieve.so
%%SIEVE%%lib/dbmail/libsort_sieve.so.0
%%SQLITE%%lib/dbmail/libsqlite.a
%%SQLITE%%lib/dbmail/libsqlite.la
%%SQLITE%%lib/dbmail/libsqlite.so
%%SQLITE%%lib/dbmail/libsqlite.so.0
@dirrm lib/dbmail
sbin/dbmail-deliver
sbin/dbmail-export
sbin/dbmail-httpd
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
%%SIEVE%%sbin/dbmail-sievecmd
sbin/dbmail-smtp
%%SIEVE%%sbin/dbmail-timsieved
sbin/dbmail-users
sbin/dbmail-util
@exec mkdir -p %D/share/%%PORTNAME%%
%%MYSQL%%@exec mkdir -p %D/share/PORTNAME/%%PORTNAME%%/mysql
%%MYSQL%%share/%%PORTNAME%%/mysql/2_1_7-2_2_0.mysql
%%MYSQL%%share/%%PORTNAME%%/mysql/create_tables.mysql
%%MYSQL%%share/%%PORTNAME%%/mysql/migrate_from_1.x_to_2.0_innodb.mysql
%%MYSQL%%share/%%PORTNAME%%/mysql/migrate_from_2.0_to_2.2.mysql
%%MYSQL%%share/%%PORTNAME%%/mysql/update_headervalue_01.mysql
%%MYSQL%%@dirrm share/%%PORTNAME%%/mysql
%%PGSQL%%@exec mkdir -p %D/share/PORTNAME/%%PORTNAME%%/postgresql
%%PGSQL%%share/%%PORTNAME%%/postgresql/2_1_7-2_2_0.pgsql
%%PGSQL%%share/%%PORTNAME%%/postgresql/create_tables.pgsql
%%PGSQL%%share/%%PORTNAME%%/postgresql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%share/%%PORTNAME%%/postgresql/migrate_from_2.0_to_2.2.pgsql
%%PGSQL%%@dirrm share/%%PORTNAME%%/postgresql
%%SQLITE%%@exec mkdir -p %D/share/PORTNAME/%%PORTNAME%%/sqlite
%%SQLITE%%share/%%PORTNAME%%/sqlite/2_1_7-2_2_0.sqlite
%%SQLITE%%share/%%PORTNAME%%/sqlite/create_tables.sqlite
%%SQLITE%%@dirrm share/%%PORTNAME%%/sqlite
@dirrm share/%%PORTNAME%%
%%SIEVE%%sbin/dbmail-sievecmd
%%SIEVE%%sbin/dbmail-timsieved
%%DATADIR%%/dbmail.schema
%%DATADIR%%/mysql/2_1_7-2_2_0.mysql
%%DATADIR%%/mysql/2_2-3_0.mysql
%%DATADIR%%/mysql/2_2_5-2_3_0.mysql
%%DATADIR%%/mysql/2_3_0-2_3_2.mysql
%%DATADIR%%/mysql/2_3_4-2_3_5.mysql
%%DATADIR%%/mysql/2_3_5-2_3_6.mysql
%%DATADIR%%/mysql/2_3_6-3_0_0.mysql
%%DATADIR%%/mysql/create_tables.mysql
%%DATADIR%%/mysql/fix_foreign_keys.mysql
%%DATADIR%%/mysql/migrate_from_1.x_to_2.0_innodb.mysql
%%DATADIR%%/mysql/migrate_from_2.0_to_2.2.mysql
%%DATADIR%%/mysql/update_headervalue_01.mysql
%%DATADIR%%/oracle/dbmail_grant.sql
%%DATADIR%%/oracle/dbmail_schema.sql
%%DATADIR%%/oracle/dbmail_ts.sql
%%DATADIR%%/postgresql/2_1_7-2_2_0.pgsql
%%DATADIR%%/postgresql/2_2-3_0.pgsql
%%DATADIR%%/postgresql/2_2_5-2_3_0.pgsql
%%DATADIR%%/postgresql/2_3_4-2_3_5.pgsql
%%DATADIR%%/postgresql/2_3_5-2_3_6.pgsql
%%DATADIR%%/postgresql/2_3_6-3_0_0.pgsql
%%DATADIR%%/postgresql/create_tables.pgsql
%%DATADIR%%/postgresql/migrate_from_1.x_to_2.0.pgsql
%%DATADIR%%/postgresql/migrate_from_2.0_to_2.2.pgsql
%%DATADIR%%/sqlite/2_1_7-2_2_0.sqlite
%%DATADIR%%/sqlite/2_2-3_0.sqlite
%%DATADIR%%/sqlite/2_2_5-2_3_0.sqlite
%%DATADIR%%/sqlite/2_3_4-2_3_5.sqlite
%%DATADIR%%/sqlite/2_3_5-2_3_6.sqlite
%%DATADIR%%/sqlite/2_3_6-3_0_0.sqlite
%%DATADIR%%/sqlite/create_tables.sqlite
%%DATADIR%%/sqlite/trigger.tmpl.sql
@dirrm %%DATADIR%%/sqlite
@dirrm %%DATADIR%%/postgresql
@dirrm %%DATADIR%%/oracle
@dirrm %%DATADIR%%/mysql
@dirrm %%DATADIR%%
@dirrm lib/dbmail
@exec mkdir -p %%PIDDIR%%
@exec chown %%DBMAIL_USER%%:%%DBMAIL_GROUP%% %%PIDDIR%%
@dirrmtry %%PIDDIR%%