freebsd-ports/devel/flyspray/Makefile
Adam Weinberger 44eaadcb75 Add OPTIONS_DEFINE=DOCS for ports with %%PORTDOCS%% in the plist.
Where possible, correct a few instances where PORTDOCS was being used
to flag stuff in EXAMPLESDIR. For some ports, mostly those owned by
ruby@, PORTDOCS is applied to pretty much everything whether it's
documentation or example.
2014-07-15 23:11:12 +00:00

86 lines
2.5 KiB
Makefile

# Created by: Nick Hilliard <nick@foobar.org>
# $FreeBSD$
PORTNAME= flyspray
PORTVERSION= 0.9.9.7
PORTREVISION= 2
CATEGORIES= devel www
MASTER_SITES= http://flyspray.org/
MAINTAINER= nick@foobar.org
COMMENT= Simple, easy-to-use web based bug tracking system
RUN_DEPENDS= ${LOCALBASE}/share/adodb/adodb.inc.php:${PORTSDIR}/databases/adodb
USE_PHP= pcre session zlib xml gd
USES= dos2unix zip
WANT_PHP_WEB= yes
NO_BUILD= yes
NO_WRKSUBDIR= yes
DOS2UNIX_REGEX= .php
OPTIONS_DEFINE= GRAPHVIZ MYSQL MYSQLI PGSQL DOCS
OPTIONS_DEFAULT= MYSQLI
MYSQLI_DESC= Use MySQLi Database Interface
FLYSPRAYDIR= ${PREFIX}/share/${PORTNAME}
FSINSTALLDIR= ${STAGEDIR}${FLYSPRAYDIR}
ATTACHMENTDIR= ${DBDIR}/${PORTNAME}/attachments
DBDIR= /var/db
DOC_FILES= AUTHORS.txt BUGS.txt CHANGELOG.txt INSTALL.txt \
QA_CHECKLIST.txt README.txt TODO.txt UPGRADING.txt \
README.FreeBSD \
licences/ADOdb.licence.txt \
licences/Flyspray.licence.txt \
licences/NuvolaIcons.licence.txt \
licences/jsCalendar.licence.txt
FLYSPRAY_FILES= cache docs/licences/gnu_lgpl.html favicon.ico \
flyspray.conf.php-dist feed.php header.php htaccess.dist \
includes index.php javascript lang plugins robots.txt \
schedule.php scripts setup templates themes
SUB_FILES+= pkg-message pkg-install
SUB_LIST+= FLYSPRAYDIR="${FLYSPRAYDIR}" \
ATTACHMENTDIR="${ATTACHMENTDIR}" \
MKDIR="${MKDIR}" \
CHOWN="${CHOWN}" \
CHMOD="${CHMOD}" \
WWWGRP="${WWWGRP}" \
WWWOWN="${WWWOWN}"
PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
MYSQL_USE= PHP=mysql
MYSQLI_USE= PHP=mysqli
PGSQL_USE= PHP=pgsql
GRAPHVIZ_RUN_DEPENDS= ${LOCALBASE}/bin/dot:${PORTSDIR}/graphics/graphviz
post-patch:
@${CP} ${PKGDIR}/files/README.FreeBSD ${WRKSRC}/docs/
@${REINPLACE_CMD} -e "s|%%FLYSPRAYDIR%%|"${FLYSPRAYDIR}"|g" \
-e "s|%%DOCSDIR%%|"${DOCSDIR}"|g" \
${WRKSRC}/docs/README.FreeBSD
@${FIND} ${WRKSRC} -name \*.orig -exec ${RM} '{}' ';'
@${REINPLACE_CMD} "s|E_ALL|E_ALL \& ~E_STRICT|g" \
${WRKSRC}/includes/fix.inc.php
@${RM} ${WRKSRC}/includes/fix.inc.php.bak
do-install:
${MKDIR} ${FSINSTALLDIR}
${CP} ${WRKSRC}/setup/upgrade/${PORTVERSION}/flyspray.conf.php ${WRKSRC}/flyspray.conf.php-dist
${TOUCH} ${FSINSTALLDIR}/flyspray.conf.php
cd ${WRKSRC} && \
${TAR} cf - ${FLYSPRAY_FILES} | \
(cd ${FSINSTALLDIR} && ${TAR} -xf -)
${LN} -sf ${ATTACHMENTDIR} ${FSINSTALLDIR}/attachments
${LN} -sf ${PREFIX}/share/adodb ${FSINSTALLDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/docs/${file} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>