freebsd-ports/devel/sonar-scanner-cli/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

63 lines
1.5 KiB
Makefile

PORTNAME= sonar-scanner-cli
DISTVERSION= 4.4.0.2170
PORTREVISION= 2
CATEGORIES= devel security www java
MASTER_SITES= https://binaries.sonarsource.com/Distribution/${PORTNAME}/
MAINTAINER= netchild@FreeBSD.org
COMMENT= Scanner component of SonarQube
WWW= https://www.sonarqube.org/
LICENSE= LGPL3
# node -> JS analysis
USES= cpe nodejs:run zip
CPE_VENDOR= sonarsource
CPE_PRODUCT= sonarqube_scanner
USE_JAVA= yes
WRKSRC= ${WRKDIR}/sonar-scanner-${DISTVERSION}
NO_ARCH= yes
NO_BUILD= yes
JAVA_VERSION= 11+
JAVA_VENDOR= openjdk
APP_NAME= ${PORTNAME}
APP_DIR= libexec/${PORTNAME}
JAR_VERSION= ${DISTVERSION}
SUB_LIST= \
APP_DIR=${APP_DIR} \
JAR_VERSION=${JAR_VERSION}
SUB_FILES= \
sonar-scanner \
pkg-message
PLIST_SUB= \
APP_DIR=${APP_DIR} \
JAR_VERSION=${JAR_VERSION}
post-extract:
${MV} ${WRKSRC}/conf/sonar-scanner.properties ${WRKSRC}/conf/sonar-scanner.properties.sample
${RM} ${WRKSRC}/bin/*.bat
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${APP_DIR}
${INSTALL} ${WRKDIR}/sonar-scanner ${STAGEDIR}${PREFIX}/bin/
.for dir in bin conf lib
cd ${WRKSRC}; ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${PREFIX}/${APP_DIR} "! -name *\.orig"
.endfor
gen-plist:
${ECHO} '@sample ${APP_DIR}/conf/sonar-scanner.properties.sample' >${PLIST}.new
${ECHO} 'bin/sonar-scanner' >>${PLIST}.new
.for dir in bin conf lib
${FIND} ${STAGEDIR}${PREFIX}/${APP_DIR}/${dir} -type f | \
${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; \
s:${JAR_VERSION}:%%JAR_VERSION%%:g" | \
${GREP} -v conf/sonar-scanner.properties | ${SORT} >> ${PLIST}.new
.endfor
.include <bsd.port.mk>