1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/sysutils/bsdstats/Makefile
Lorenzo Salvadore 3e8922ee73 sysutils/bsdstats: Update to 7.0
- Use pkg query %n:%v:%o instead of pkg info -o “*” to get list of
  installed packages. This simplifies processing and accuracy of split for
  version numbers on the report server by not having to guess where that
  split is.
- Check for existence of %%PREFIX%%/etc/bsdstats.conf and if it exists,
  restrict ports submitted to those listed in there.
- Add a note to pkg-message.in about %%PREFIX%%/etc/bsdstats.conf
- Get rid of the LIMITED config option: LIMITED is enabled if and only if
  %%PREFIX%%/etc/bsdstats.conf exists.

While here, also modernize the port using option helpers.

Submitted by:	scrappy
Approved by:	gerald (mentor)
Differential Revision:	https://reviews.freebsd.org/D24644
2020-04-30 23:32:18 +00:00

46 lines
1.3 KiB
Makefile

# Created by: Marc G. Fournier <scrappy@FreeBSD.org>
# $FreeBSD$
PORTNAME= bsdstats
PORTVERSION= 7.0
CATEGORIES= sysutils
DISTFILES=
MAINTAINER= salvadore@FreeBSD.org
COMMENT= Monthly script for reporting anonymous statistics about your machine
LICENSE= BSD4CLAUSE
NO_BUILD= yes
USE_RC_SUBR= bsdstats
SUB_FILES= 300.statistics bsdstats-send pkg-message
SUB_LIST+= VERSION=${PORTVERSION}
NO_ARCH= YES
PLIST_FILES= bin/bsdstats-send \
etc/periodic/monthly/300.statistics
OPTIONS_DEFINE= TOR
TOR_DESC= Submit securely through TOR anonymity network
TOR_RUN_DEPENDS= tor:security/tor
pre-install-TOR-on:
@${REINPLACE_CMD} -e 's|USE_TOR=NO|USE_TOR=YES|' ${WRKDIR}/300.statistics
@${REINPLACE_CMD} -e 's|# REQUIRE: LOGIN|# REQUIRE: LOGIN tor|' ${WRKDIR}/bsdstats
@${REINPLACE_CMD} -e 's|@@TOR_MESSAGE@@|Statistics will be submitted anonymously through the TOR network|' \
${WRKDIR}/pkg-message
pre-install-TOR-off:
@${REINPLACE_CMD} -e 's|@@TOR_MESSAGE@@|You can build bsdstats with TOR port option to submit anonymously|' \
${WRKDIR}/pkg-message
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/monthly
${INSTALL_SCRIPT} ${WRKDIR}/300.statistics \
${STAGEDIR}${PREFIX}/etc/periodic/monthly
${INSTALL_SCRIPT} ${WRKDIR}/bsdstats-send \
${STAGEDIR}${PREFIX}/bin/bsdstats-send
.include <bsd.port.mk>