freebsd-ports/sysutils/backuppc-devel/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

102 lines
2.9 KiB
Makefile

PORTNAME= backuppc
DISTVERSION= 4.3.3.20200531
CATEGORIES= sysutils
PKGNAMESUFFIX= -devel
MAINTAINER= moiseev@mezonplus.ru
COMMENT= Multi-platform backup to disk-based storage
WWW= https://backuppc.github.io/backuppc/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
EXTRACT_DEPENDS= p5-BackupPC-XS>=0.60:sysutils/p5-BackupPC-XS
RUN_DEPENDS= p5-CGI>0:www/p5-CGI \
p5-File-Listing>=0:sysutils/p5-File-Listing \
p5-BackupPC-XS>=0.57:sysutils/p5-BackupPC-XS
USES= cpe perl5
.if defined(QEMU_EMULATING) && "${QEMU_EMULATING}" == "1"
BROKEN= fails to build under qemu: uncaught target signal 11 (Segmetation fault) - core dumped
.endif
CONFLICTS_INSTALL= backuppc backuppc4
CPE_VENDOR= craig_barratt
USE_GITHUB= yes
GH_TAGNAME= cae051c
USE_PERL5= extract
NO_BUILD= yes
NO_ARCH= yes
USE_RC_SUBR= backuppc
WRKSRC_SUBDIR= dist/BackupPC-${PORTVERSION}
USERS= backuppc
GROUPS= backuppc
DOCSDIR= ${PREFIX}/share/doc/BackupPC
CGIDIR?= ${PREFIX}/www/cgi-bin
SUB_FILES= pkg-deinstall pkg-message update.sh
SUB_LIST= CGIDIR=${CGIDIR}
PLIST_SUB+= CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \
DISTVERSION=${DISTVERSION}
PORTDOCS= ChangeLog LICENSE README.md
OPTIONS_DEFINE= ARCHIVE_ZIP DOCS RSYNC_BPC \
RRDTOOL SMB XML_RSS
OPTIONS_DEFAULT= ARCHIVE_ZIP
ARCHIVE_ZIP_DESC= Install Perl module for Zip archive files
RSYNC_BPC_DESC= Install modified rsync that used as part of BackupPC
RRDTOOL_DESC= Install Round Robin Database Tools
SMB_DESC= Install Samba (for "smb" transfer and NetBIOS lookup)
XML_RSS_DESC= Install Perl extension to manage RSS files
ARCHIVE_ZIP_RUN_DEPENDS= p5-Archive-Zip>=0:archivers/p5-Archive-Zip
RSYNC_BPC_RUN_DEPENDS= rsync-bpc>=3.0.9.6:net/rsync-bpc
RRDTOOL_RUN_DEPENDS= rrdtool:databases/rrdtool
SMB_USES= samba:run # nmblookup, smbclient
XML_RSS_RUN_DEPENDS= p5-XML-RSS>=0:textproc/p5-XML-RSS
post-extract:
cd ${WRKDIR}/${PORTNAME}-${GH_TAGNAME} && ${PERL} makeDist \
--nosyntaxCheck \
--version ${PORTVERSION}
do-install:
cd ${WRKSRC} && ${PERL} configure.pl \
--batch \
--backuppc-user ${USERS} \
--bin-path perl=${PERL} \
--config-dir ${ETCDIR} \
--cgi-dir ${CGIDIR} \
--data-dir /var/db/BackupPC \
--dest-dir ${STAGEDIR} \
--fhs \
--html-dir ${WWWDIR} \
--html-dir-url /${PORTNAME} \
--install-dir ${PREFIX} \
--log-dir /var/log/BackupPC \
--no-set-perms \
--uid-ignore
pod2man --section=1 --release=${PORTVERSION} \
--name=BackupPC --center="BackupPC user guide" \
${WRKSRC}/doc/BackupPC.pod ${WRKSRC}/${PORTNAME}.1
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
${CP} ${WRKSRC}/doc/BackupPC.html ${STAGEDIR}${WWWDIR}
${RM} ${STAGEDIR}${ETCDIR}/config.pl
${RM} ${STAGEDIR}${ETCDIR}/hosts
${CP} ${WRKDIR}/update.sh ${STAGEDIR}${ETCDIR}/update.sh
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/backuppc
${CP} ${WRKSRC}/configure.pl ${STAGEDIR}${PREFIX}/libexec/backuppc/configure.pl
.include <bsd.port.mk>