ports/devel/cvsweb3/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

104 lines
3 KiB
Makefile

PORTNAME= cvsweb
PORTVERSION= 3.0.6
PORTREVISION= 5
CATEGORIES= devel www
MASTER_SITES= LOCAL/scop http://people.FreeBSD.org/~scop/cvsweb/
PKGNAMESUFFIX= 3
# For issues that are not specific to this port/package, please consult
# the <freebsd-cvsweb@FreeBSD.org> mailing list.
MAINTAINER= noackjr@alumni.rice.edu
COMMENT= WWW CGI script to browse CVS repository trees version 3
WWW= https://www.FreeBSD.org/projects/cvsweb.html
LICENSE= BSD2CLAUSE
RUN_DEPENDS= p5-IPC-Run>=0:devel/p5-IPC-Run \
p5-URI>=0:net/p5-URI
# The following extra dependencies are optional, but CVSweb works the
# best with them.
RUN_DEPENDS+= p5-MIME-Types>=0:mail/p5-MIME-Types \
p5-String-Ediff>=0:devel/p5-String-Ediff \
cvsgraph:devel/cvsgraph
# Use PAPERSIZE to avoid a stale dependency on Enscript.
PAPERSIZE?= letter
RUN_DEPENDS+= enscript:print/enscript-${PAPERSIZE}
CONFLICTS= cvsweb-2.*
USES= cpe perl5 shebangfix
SHEBANG_FILES= cvsweb.cgi
CPE_VENDOR= freebsd
NO_BUILD= yes
NO_ARCH= yes
PLIST_SUB= CGIDIR="${CGIDIR}" ICONSDIR="${ICONSDIR}" CSSDIR="${CSSDIR}" \
DIRPREFIX="${DIRPREFIX}"
SUB_FILES= pkg-message
OPTIONS_DEFINE= DOCS EXAMPLES
CONFFILES= cvsweb.conf \
cvsweb.conf-freebsd \
cvsweb.conf-openbsd \
cvsweb.conf-netbsd \
cvsweb.conf-ruby
# Specify the title of your cvsweb site.
TITLE?= My CVS Repository
.include <bsd.port.pre.mk>
# Specify where your repository belongs.
# (You can reconfigure it after installation anyway)
.if defined(PACKAGE_BUILDING) || !defined(CVSROOT) || empty(CVSROOT)
CVSROOT= /home/cvs
.endif
# Specify these directories in relative paths to ${PREFIX}.
.if exists(${PREFIX}/www/cgi-bin)
DIRPREFIX= www
.elif exists(${PREFIX}/www/apache24/cgi-bin)
DIRPREFIX= www/apache24
.elif exists(${PREFIX}/apache/cgi-bin)
DIRPREFIX= apache
.else
DIRPREFIX= share/apache
.endif
CGIDIR?= ${DIRPREFIX}/cgi-bin
ICONSDIR?= ${DIRPREFIX}/icons
CSSDIR?= ${DIRPREFIX}/data/css
post-patch:
@${SED} -i '' -e 's,/usr/local/etc/,${PREFIX}/etc/,' \
-e 's,\(qw(hi.*)\),(\1),' ${WRKSRC}/cvsweb.cgi
@${REINPLACE_CMD} -i '' -e 's,!!PREFIX!!,${PREFIX},' \
-e 's,!!CVSROOT!!,${CVSROOT},' \
-e 's,!!TITLE!!,${TITLE},' \
${WRKSRC}/cvsweb.conf
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}
${INSTALL_SCRIPT} ${WRKSRC}/cvsweb.cgi ${STAGEDIR}${PREFIX}/${CGIDIR}/
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/cvsweb
.for f in ${CONFFILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/etc/cvsweb/${f}.dist
.endfor
@${MKDIR} ${STAGEDIR}${PREFIX}/${ICONSDIR}/cvsweb
${INSTALL_DATA} ${WRKSRC}/icons/* ${STAGEDIR}${PREFIX}/${ICONSDIR}/cvsweb/
@${MKDIR} ${STAGEDIR}${PREFIX}/${CSSDIR}/cvsweb
${INSTALL_DATA} ${WRKSRC}/css/*.css ${STAGEDIR}${PREFIX}/${CSSDIR}/cvsweb/
@${MKDIR} ${STAGEDIR}${PREFIX}/share/enscript/hl
${INSTALL_DATA} ${WRKSRC}/enscript/*.st ${STAGEDIR}${PREFIX}/share/enscript/hl/
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ChangeLog INSTALL NEWS README TODO
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
.endfor
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR}/
.include <bsd.port.post.mk>