freebsd-ports/mail/perdition/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

150 lines
3.8 KiB
Makefile

PORTNAME= perdition
PORTVERSION= 2.2
PORTREVISION= 1
CATEGORIES= mail net security
MASTER_SITES= http://horms.net/projects/perdition/download/${PORTVERSION}/
MAINTAINER= ports@FreeBSD.org
COMMENT= POP3 & IMAP4 proxy that can map users to multiple backend servers
WWW= https://www.vergenet.net/linux/perdition/
LIB_DEPENDS= libpopt.so:devel/popt \
libvanessa_logger.so:devel/libvanessa_logger \
libvanessa_socket.so:devel/libvanessa_socket \
libvanessa_adt.so:devel/libvanessa_adt
USES= cpe gettext libtool pkgconfig shebangfix
SHEBANG_FILES= ${WRKSRC}/perdition/db/ldap/perditiondb_ldap_makedb \
${WRKSRC}/perdition/db/mysql/perditiondb_mysql_makedb \
${WRKSRC}/perdition/db/odbc/perditiondb_odbc_makedb \
${WRKSRC}/perdition/db/postgresql/perditiondb_postgresql_makedb
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV+= DOCSDIR=${DOCSDIR}
CONFIGURE_ARGS+=--localstatedir=/var
INSTALL_TARGET= install-strip
CPE_VENDOR= horms
USE_LDCONFIG= yes
USE_RC_SUBR= perdition perdition.pop3 perdition.pop3s \
perdition.imap4 perdition.imap4s perdition.imaps
OPTIONS_DEFINE= BDB DAEMON_MAP DOCS GDBM LDAP MYSQL NIS ODBC \
OPENSSL PGSQL POSIX_REGEX
OPTIONS_DEFAULT= GDBM OPENSSL POSIX_REGEX
DAEMON_MAP_DESC= Daemon Map support
GDBM_DESC= GDBM database
POSIX_REGEX_DESC= Native regex support
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENSSL}
CONFIGURE_ARGS+= --enable-ssl
USES+= ssl
.else
CONFIGURE_ARGS+= --disable-ssl
.endif
.if ${PORT_OPTIONS:MPOSIX_REGEX}
CONFIGURE_ARGS+= --enable-posix_regex
PLIST_SUB+= POSIXREGEX=""
.else
CONFIGURE_ARGS+= --disable-posix_regex
PLIST_SUB+= POSIXREGEX="@comment "
.endif
.if ${PORT_OPTIONS:MDAEMON_MAP}
CONFIGURE_ARGS+= --enable-daemon-map
PLIST_SUB+= DAEMONMAP=""
LIB_DEPENDS+= libgdbm.so:databases/gdbm
.else
CONFIGURE_ARGS+= --disable-daemon-map
PLIST_SUB+= DAEMONMAP="@comment "
.endif
.if ${PORT_OPTIONS:MBDB}
CPPFLAGS+= -I${BDB_INCLUDE_DIR}
CONFIGURE_ARGS+= --enable-bdb
PLIST_SUB+= BDB=""
USES+= bdb
.else
CONFIGURE_ARGS+= --disable-bdb
PLIST_SUB+= BDB="@comment "
.endif
.if ${PORT_OPTIONS:MNIS}
CONFIGURE_ARGS+= --enable-nis
PLIST_SUB+= NIS=""
.else
CONFIGURE_ARGS+= --disable-nis
PLIST_SUB+= NIS="@comment "
.endif
.if ${PORT_OPTIONS:MGDBM}
CONFIGURE_ARGS+= --enable-gdbm
LIB_DEPENDS+= libgdbm.so:databases/gdbm
PLIST_SUB+= GDBM=""
.else
CONFIGURE_ARGS+= --disable-gdbm
PLIST_SUB+= GDBM="@comment "
.endif
.if ${PORT_OPTIONS:MMYSQL}
USES+= mysql
CONFIGURE_ARGS+= --enable-mysql
PLIST_SUB+= MYSQL=""
.else
CONFIGURE_ARGS+= --disable-mysql
PLIST_SUB+= MYSQL="@comment "
.endif
.if ${PORT_OPTIONS:MPGSQL}
CONFIGURE_ARGS+= --enable-pg
USES+= pgsql
PLIST_SUB+= PGSQL=""
.else
CONFIGURE_ARGS+= --disable-pg
PLIST_SUB+= PGSQL="@comment "
.endif
.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --enable-ldap \
--with-ldap-schema-directory=${LOCALBASE}/etc/openldap/schema/ \
--disable-ldap-doc
PLIST_SUB+= LDAP=""
.else
CONFIGURE_ARGS+= --disable-ldap
PLIST_SUB+= LDAP="@comment "
.endif
.if ${PORT_OPTIONS:MODBC}
CONFIGURE_ARGS+= --enable-odbc
LIB_DEPENDS+= libodbc.so:databases/unixODBC
PLIST_SUB+= ODBC=""
.else
CONFIGURE_ARGS+= --disable-odbc
PLIST_SUB+= ODBC="@comment "
.endif
post-patch:
cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|-ldb|-l${BDB_LIB_NAME}|g' \
configure \
makebdb/Makefile.in \
perdition/db/bdb/Makefile.in
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/etc/pam.d/perdition ${STAGEDIR}${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} ""
.endif
.include <bsd.port.mk>