1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/mail/dbmail-devel/Makefile
Edwin Groothuis f45d770362 New port: mail/dbmail21 -current branch of DBMail
Dbmail is the name of a group of programs that enable the possiblilty
	of storing and retrieving mail messages from a database (currently
	MySQL, PostgreSQL or SQLite).

	What are the advantages?

	    * Scalability.
	      Dbmail is as scalable as the database that is used for the
	      mail storage.
	    * Manageability.
	      Dbmail is based upon a database. Dbmail can be managed by
	      changing settings in the database (f.e. using PHP/Perl/SQL).
	    * Speed.
	      Dbmail uses very efficient, database specific queries for
	      retrieving mail information. This is much faster then parsing
	      a filesystem.
	    * Security.
	      Dbmail has got nothing to do with the filesystem or interaction
	      with other programs in the Unix environment which need special
	      permissions.  Dbmail is as secure as the database it's based
	      upon.
	    * Flexibility.
	      Changes on a Dbmail system (adding of users, changing passwords
	      etc.) are effective immediately.

	WWW: http://www.dbmail.org/

PR:		ports/101356
Submitted by:	Mark Starovoytov <mark_sf@kikg.ifmo.ru>
2006-08-05 22:35:33 +00:00

138 lines
3.5 KiB
Makefile

# New ports collection makefile for: dbmail
# Date created: 3 August 2006
# Whom: Mark Starovoytov <mark_sf@kikg.ifmo.ru>
#
# $FreeBSD$
#
PORTNAME= dbmail
PORTVERSION= 2.1.7
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.1/
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
CONFLICTS= dbmail-*-2.0.*
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
USE_AUTOTOOLS= libtool:15
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
USE_LDCONFIG= ${PREFIX}/lib/dbmail
USE_RC_SUBR= dbmail-pop3d.sh dbmail-lmtpd.sh dbmail-imapd.sh
LIB_DEPENDS+= gmime-2.0.4:${PORTSDIR}/mail/gmime2
USE_GNOME= glib20
USE_OPENSSL= YES
USE_PTHREADS= YES
CFLAGS+= -fPIC -I${LOCALBASE}/include
LDFLAGS+= -pthread
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" LOCALBASE=${LOCALBASE}
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
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
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST_SUB+= PORTNAME=${PORTNAME}
.if defined(NOPORTDOCS)
PLIST_SUB+= PORTDOCS="@comment "
.else
PLIST_SUB+= PORTDOCS=""
.endif
.include <bsd.port.pre.mk>
.if defined(WITH_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
LIB_DEPENDS+= sieve.1:${PORTSDIR}/mail/libsieve
PLIST_SUB+= SIEVE=""
.else
PLIST_SUB+= SIEVE="@comment "
.endif
.if defined(WITH_LDAP)
CONFIGURE_ARGS+=--with-auth-ldap=${LOCALBASE}/include
USE_OPENLDAP= yes
.endif
.if defined(WITHOUT_MYSQL) && defined(WITHOUT_POSTGRESQL) && defined(WITHOUT_SQLITE)
IGNORE="requires at least one database backend selected. Run 'make config'"
.endif
.if ( ${OSVERSION} < 503000 )
IGNORE="can be compiled only on FreeBSD 5.3-RELEASE or greater"
.endif
post-patch:
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
${SED} -e 's|%%DATADIR%%|${DATADIR}|g' \
${MSG_FILE} > ${PKGMESSAGE}
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
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; \
fi
@${MKDIR} ${DATADIR}
@for f in ${DATABASE}; do \
${MKDIR} ${DATADIR}/$$f ; \
${INSTALL_DATA} ${WRKSRC}/sql/$$f/* ${DATADIR}/$$f; \
done
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>