freebsd-ports/deskutils/goesimage/Makefile
Tobias C. Berner 45526ecbee framework: Add new USES 'magick' for graphics/ImageMagick*
A new USES has been added to depend on ImageMagick.

	USES=magick

adds a LIB_DEPENDS on graphics/ImageMagick${IMAGEMAGICK_DEFAULT}.

If a specific version is required, use for example

	USES=magick:6        resp.     USES=magick:7

If only a build, run or test is required, use for example

	USES=magick:build    resp.     USES=magick:6,build,test

If a dependency on the nox11 flavor is required, use for example

	USES=magick:nox11    resp.     USES=magick:7,nox11,run,test

See magick.mk for more details on the available flags.

The tree has been completely converted to make use of this.

Approved by:	bapt
Differential Revision: https://reviews.freebsd.org/D32754
2021-12-11 14:50:53 +01:00

46 lines
1.4 KiB
Makefile

PORTNAME= goesimage
DISTVERSION= 0.1.3
CATEGORIES= deskutils
MAINTAINER= yuri@FreeBSD.org
COMMENT= Wallpapers from NOAA Geostationary Operational Environment Satellite
LICENSE= UNLICENSE
LICENSE_FILE= ${WRKSRC}/UNLICENSE
RUN_DEPENDS= bash:shells/bash \
curl:ftp/curl \
nitrogen:sysutils/nitrogen
USES= magick:6,run shebangfix
SHEBANG_FILES= goesimage
USE_GITHUB= yes
GH_ACCOUNT= pigmonkey
NO_BUILD= yes
NO_ARCH= yes
SUB_LIST= PORTNAME=${PORTNAME}
SUB_FILES= crontab
RUN_ARGS= -w -e -o # -w: NOAA GOES West satellite, -e: NOAA GOES East satellite, -o: print output, don't set as a wallpaper (it is set by nitrogen)
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/libexec/
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/crontab ${STAGEDIR}${DATADIR}
@(echo "#!/bin/sh"; \
echo ""; \
echo "crontab -l | ${GREP} -v '${PREFIX}/bin/${PORTNAME}' | (cat ; cat ${DATADIR}/crontab) | crontab -"; \
) > ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-enable
@(echo "#!/bin/sh"; \
echo ""; \
echo "crontab -l | ${GREP} -v '${PREFIX}/bin/${PORTNAME}' | crontab -"; \
) > ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-disable
@(echo "#!/bin/sh"; \
echo ""; \
echo "${PREFIX}/bin/nitrogen --set-zoom "$$"(${PREFIX}/libexec/${PORTNAME} ${RUN_ARGS})"; \
) > ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-run-now
@cd ${STAGEDIR}${PREFIX}/bin && ${CHMOD} +x ${PORTNAME}-enable ${PORTNAME}-disable ${PORTNAME}-run-now
.include <bsd.port.mk>