Changeset View
Changeset View
Standalone View
Standalone View
www/tt-rss/Makefile
# Created by: Thierry Thomas <thierry@pompo.net> | # Created by: Thierry Thomas <thierry@pompo.net> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= tt-rss | PORTNAME= tt-rss | ||||
PORTVERSION= g20200801 | PORTVERSION= g20200801 | ||||
PORTREVISION= 1 | |||||
PORTEPOCH= 1 | PORTEPOCH= 1 | ||||
CATEGORIES= www | CATEGORIES= www | ||||
MASTER_SITES= https://git.tt-rss.org/fox/tt-rss/archive/ | MASTER_SITES= https://git.tt-rss.org/fox/tt-rss/archive/ | ||||
DISTNAME= ${GIT_TAGNAME} | DISTNAME= ${GIT_TAGNAME} | ||||
DIST_SUBDIR= ${PORTNAME} | DIST_SUBDIR= ${PORTNAME} | ||||
MAINTAINER= dereks@lifeofadishwasher.com | MAINTAINER= dereks@lifeofadishwasher.com | ||||
COMMENT= Tiny Tiny RSS: web-based news feed (RSS/Atom) aggregator | COMMENT= Tiny Tiny RSS: web-based news feed (RSS/Atom) aggregator | ||||
LICENSE= GPLv2 | LICENSE= GPLv2 | ||||
USES= php:cli,web shebangfix gettext-tools | USES= php:cli,web shebangfix gettext-tools | ||||
USE_PHP= ctype dom fileinfo intl hash json mbstring pcntl posix session xmlrpc | USE_PHP= ctype dom fileinfo iconv intl hash json mbstring pcntl posix session xmlrpc | ||||
REINPLACE_ARGS= -i "" | REINPLACE_ARGS= -i "" | ||||
SHEBANG_FILES= lib/dojo-src/rebuild-dojo.sh utils/extract-i18n-js.pl | SHEBANG_FILES= lib/dojo-src/rebuild-dojo.sh utils/extract-i18n-js.pl update_daemon2.php | ||||
WRKSRC= ${WRKDIR}/tt-rss | WRKSRC= ${WRKDIR}/tt-rss | ||||
GIT_TAGNAME= 2b50aaed6 | GIT_TAGNAME= 2b50aaed6 | ||||
NO_BUILD= yes | NO_BUILD= yes | ||||
NO_ARCH= yes | NO_ARCH= yes | ||||
USE_RC_SUBR= ttrssd | USE_RC_SUBR= ttrssd | ||||
OPTIONS_DEFINE= CURL GD | OPTIONS_DEFINE= CURL GD | ||||
OPTIONS_SINGLE= DB | OPTIONS_SINGLE= DB | ||||
OPTIONS_SINGLE_DB= MYSQL PGSQL | OPTIONS_SINGLE_DB= MYSQL PGSQL | ||||
OPTIONS_DEFAULT= CURL GD MYSQL | OPTIONS_DEFAULT= CURL GD MYSQL | ||||
CURL_DESC= Use SimplePie instead of Magpie | CURL_DESC= Use SimplePie instead of Magpie | ||||
CURL_USE= PHP=curl | |||||
GD_DESC= Use OTP QR code generation | GD_DESC= Use OTP QR code generation | ||||
GD_USE= PHP=gd | |||||
.include <bsd.port.options.mk> | PGSQL_VARS= DB=pgsql | ||||
PGSQL_USE= PHP=pdo_pgsql,pgsql | |||||
PSQL_VARS_OFF= PGSQL="\#" | |||||
.if ${PORT_OPTIONS:MPGSQL} | MYSQL_VARS= DB=mysql | ||||
USE_PHP+= pdo_pgsql pgsql | MYSQL_USE= PHP=pdo_mysql,mysqli | ||||
DB= pgsql | MYSQL_VARS_OFF= MYSQL="\#" | ||||
MYSQL= "\#" | |||||
PGSQL= | |||||
.endif | |||||
.if ${PORT_OPTIONS:MMYSQL} | .include <bsd.port.options.mk> | ||||
USE_PHP+= pdo_mysql mysqli | |||||
DB= mysql | |||||
MYSQL= | |||||
PGSQL= "\#" | |||||
.endif | |||||
.if ${PORT_OPTIONS:MCURL} | |||||
USE_PHP+= curl | |||||
.endif | |||||
.if ${PORT_OPTIONS:MGD} | |||||
USE_PHP+= gd | |||||
.endif | |||||
SUB_FILES= httpd-tt-rss.conf pkg-message | SUB_FILES= httpd-tt-rss.conf pkg-message | ||||
SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} | SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} | ||||
PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} | PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} | ||||
PHP2FIX= config.php-dist update.php update_daemon2.php | PHP2FIX= config.php-dist update.php | ||||
SCRIPTS= update.php update_daemon2.php | SCRIPTS= update.php update_daemon2.php | ||||
pre-configure: | pre-configure: | ||||
.for script in ${PHP2FIX} | .for script in ${PHP2FIX} | ||||
${REINPLACE_CMD} -e 's|/usr/bin/php|${LOCALBASE}/bin/php|' \ | ${REINPLACE_CMD} -e 's|/usr/bin/php|${LOCALBASE}/bin/php|' \ | ||||
-e 's|/usr/bin/env php| ${LOCALBASE}/bin/php|' \ | -e 's|/usr/bin/env php| ${LOCALBASE}/bin/php|' \ | ||||
${WRKSRC}/${script} | ${WRKSRC}/${script} | ||||
.endfor | .endfor | ||||
do-configure: | |||||
.if ${PORT_OPTIONS:MPGSQL} | |||||
${REINPLACE_CMD} -e '/DB_TYPE/s|pgsql|mysql|;s|mysql$$|pgsql|' \ | |||||
${WRKSRC}/config.php-dist | |||||
.endif | |||||
do-install: | do-install: | ||||
${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${DATADIR} | ${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${DATADIR} | ||||
(cd ${WRKSRC} && ${COPYTREE_SHARE} "*" ${STAGEDIR}${WWWDIR} "! -name LICENSE") | (cd ${WRKSRC} && ${COPYTREE_SHARE} "*" ${STAGEDIR}${WWWDIR} \ | ||||
"! -name LICENSE ! -name .empty") | |||||
${RM} -r ${STAGEDIR}${WWWDIR}/debian | ${RM} -r ${STAGEDIR}${WWWDIR}/debian | ||||
${MKDIR} ${STAGEDIR}${WWWDIR}/icons/ # Not used for fresh installation | |||||
${TOUCH} ${STAGEDIR}${WWWDIR}/icons/.empty | |||||
${INSTALL_DATA} ${WRKDIR}/httpd-tt-rss.conf ${STAGEDIR}${DATADIR} | ${INSTALL_DATA} ${WRKDIR}/httpd-tt-rss.conf ${STAGEDIR}${DATADIR} | ||||
${ECHO} "${OPSYS}:${PORTVERSION}:${GIT_TAGNAME}" > "${STAGEDIR}${WWWDIR}/version_static.txt" | ${ECHO} "${OPSYS}:${PORTVERSION}:${GIT_TAGNAME}" > "${STAGEDIR}${WWWDIR}/version_static.txt" | ||||
${RLN} ${STAGEDIR}${WWWDIR}/config.php-dist ${STAGEDIR}${WWWDIR}/config.php.sample | |||||
${MV} ${STAGEDIR}${WWWDIR}/config.php-dist ${STAGEDIR}${WWWDIR}/config.php.sample | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |