freebsd-ports/mail/ezmlm-idx/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

101 lines
3.2 KiB
Makefile

PORTNAME= ezmlm-idx
PORTVERSION= 7.2.2
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://untroubled.org/ezmlm/archive/${PORTVERSION}/
MAINTAINER= ports@FreeBSD.org
COMMENT= Improved version of the ezmlm mailing list manager
WWW= https://www.untroubled.org/ezmlm/
LICENSE= GPLv2
USES= groff qmail:run
CONFLICTS= ezmlm # bin/ezmlm-list bin/ezmlm-make bin/ezmlm-manage bin/ezmlm-reject bin/ezmlm-return bin/ezmlm-send bin/ezmlm-sub bin/ezmlm-unsub bin/ezmlm-warn bin/ezmlm-weed
SUB_FILES= pkg-message
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= DB DOCS
OPTIONS_SINGLE= DB
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE
DB_DESC= Enable database extension support
MYSQL_DESC= Build the MySQL extension
PGSQL_DESC= Build the PostgreSQL extension
SQLITE_DESC= Build the SQLite3 extension
.include <bsd.port.options.mk>
ALL_TARGET= it
.if ${PORT_OPTIONS:MMYSQL}
USES+= mysql
EXTRACT_INCLUDE+= -I${LOCALBASE}/include/mysql
EXTRACT_LIB+= -L${LOCALBASE}/lib/mysql -lmysqlclient -lm
ALL_TARGET+= mysql
PLIST_SUB+= MYSQL="" PGSQL="@comment " SQLITE="@comment "
.endif
.if ${PORT_OPTIONS:MPGSQL}
USES+= pgsql
EXTRACT_INCLUDE+= -I${LOCALBASE}/include
EXTRACT_LIB+= -L${LOCALBASE}/lib -lpq -lcrypt
ALL_TARGET+= pgsql
PLIST_SUB+= MYSQL="@comment " PGSQL="" SQLITE="@comment "
.endif
.if ${PORT_OPTIONS:MSQLITE}
USES+= sqlite
EXTRACT_INCLUDE+= -I${LOCALBASE}/include
EXTRACT_LIB+= -L${LOCALBASE}/lib -lsqlite3
ALL_TARGET+= sqlite3
PLIST_SUB+= MYSQL="@comment " PGSQL="@comment " SQLITE=""
.else
PLIST_SUB+= MYSQL="@comment " PGSQL="@comment " SQLITE="@comment "
.endif
CONFIG= ezmlmglrc ezmlmrc ezmlmsubrc
DOCS= BLURB CHANGES ChangeLog DOWNGRADE FAQ HISTORY INSTALL README \
README.mysql README.pgsql README.std TODO UPGRADE
post-patch:
@${ECHO_CMD} "/usr/sbin" > ${WRKSRC}/conf-cron
@${ECHO_CMD} "${PREFIX}/bin" > ${WRKSRC}/conf-bin
@${ECHO_CMD} "${PREFIX}/etc/ezmlm" > ${WRKSRC}/conf-etc
@${ECHO_CMD} "${PREFIX}/lib/ezmlm" > ${WRKSRC}/conf-lib
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s -rdynamic" > ${WRKSRC}/conf-ld
.if ${PORT_OPTIONS:MMYSQL}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s -rdynamic ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.elif ${PORT_OPTIONS:MPGSQL}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s -rdynamic ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.elif ${PORT_OPTIONS:MSQLITE}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s -rdynamic ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.endif
@${ECHO_CMD} "${MANPREFIX}/man" > ${WRKSRC}/conf-man
@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
@${REINPLACE_CMD} -e 's,/etc/ezmlm/,${PREFIX}/etc/ezmlm/,' \
${WRKSRC}/idx.h
@${REINPLACE_CMD} -e "s:\(/installer\) \(\"\`head\):\1 ${STAGEDIR}\2:" \
-e "s:\(\"\`head -n 1 conf-etc\`\"/default\):${STAGEDIR}\1:" \
${WRKSRC}/Makefile
pre-install:
@${REINPLACE_CMD} -e '/\/cat/d' ${WRKSRC}/MAN
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/ezmlm
.for file in ${CONFIG}
@${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/etc/ezmlm/${file}.sample
.endfor
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>