2008-12-27 04:38:24 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= rt
|
2014-07-30 14:55:34 +02:00
|
|
|
PORTVERSION= 4.0.21
|
2008-12-27 04:38:24 +01:00
|
|
|
CATEGORIES= www
|
|
|
|
MASTER_SITES= http://download.bestpractical.com/pub/rt/release/ \
|
2013-07-24 07:16:37 +02:00
|
|
|
SF/requesttracker/
|
2014-01-12 00:04:21 +01:00
|
|
|
PKGNAMESUFFIX= 40
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2012-02-09 18:09:51 +01:00
|
|
|
MAINTAINER= matthew@FreeBSD.org
|
2008-12-27 04:38:24 +01:00
|
|
|
COMMENT= RT is an industrial-grade ticketing system written in Perl
|
|
|
|
|
2014-01-12 00:04:21 +01:00
|
|
|
CONFLICTS_INSTALL= rt-3.8* rt42-4.2* brlcad-[0-9]*
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2013-12-08 23:38:52 +01:00
|
|
|
NO_ARCH= yes
|
|
|
|
|
2011-10-07 15:02:36 +02:00
|
|
|
# See doc/web_deployment.pod for info on the choices of webserver /
|
2012-02-05 18:16:12 +01:00
|
|
|
# webapp combinations. Note: if using apache, apache-2.2+ is
|
2013-05-16 07:30:10 +02:00
|
|
|
# recommended. For deployment with nginx, use the SPAWN_FCGI method
|
|
|
|
# or the builtin webserver with a FCGI handler.
|
|
|
|
#
|
|
|
|
# The builtin standalone PSGI based webserver is always available, no
|
2013-12-08 23:38:52 +01:00
|
|
|
# matter what choice of web deployment platform, or none, that you
|
2013-05-16 07:30:10 +02:00
|
|
|
# make. Best Practical state that this is really only suitable for
|
|
|
|
# development usage, although I have heard reports of people using it
|
|
|
|
# successfully for medium sized deployments. If you only want the
|
|
|
|
# builtin webserver, simply deselect all of the web options.
|
2011-10-07 15:02:36 +02:00
|
|
|
#
|
|
|
|
# See doc/full_text_indexing.pod if you need to set up full text
|
|
|
|
# indexes on your ticket database. PostgreSQL or Oracle are
|
|
|
|
# recommended in this case: the MYSQL / SphinxSearch combination
|
|
|
|
# mentioned in the docs is currently unsupported in the ports, but see
|
|
|
|
# http://www.infracaninophile.co.uk/articles/sphinxse.html
|
|
|
|
|
2014-07-16 05:34:56 +02:00
|
|
|
OPTIONS_DEFINE= DEV GD GPG GRAPHVIZ SSL_MAILGATE DOCS
|
2012-12-15 10:05:54 +01:00
|
|
|
OPTIONS_SINGLE= DB
|
2012-06-04 21:25:56 +02:00
|
|
|
OPTIONS_SINGLE_DB= MYSQL ORACLE PGSQL SQLITE
|
2012-12-15 10:05:54 +01:00
|
|
|
OPTIONS_RADIO= WEB
|
|
|
|
OPTIONS_RADIO_WEB= AP_MODFASTCGI AP_MODPERL LIGHTTPD SPAWN_FCGI
|
2012-06-04 21:25:56 +02:00
|
|
|
|
|
|
|
OPTIONS_DEFAULT= AP_MODPERL GD GPG MYSQL
|
|
|
|
|
2014-01-12 00:04:21 +01:00
|
|
|
USERS?= www
|
|
|
|
GROUPS?= rt www
|
2011-10-07 15:02:36 +02:00
|
|
|
|
2014-01-19 15:34:39 +01:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/jsmin:${PORTSDIR}/devel/jsmin
|
2008-12-27 04:38:24 +01:00
|
|
|
|
|
|
|
.include "${.CURDIR}/Makefile.cpan"
|
|
|
|
|
2014-01-19 15:34:39 +01:00
|
|
|
RUN_DEPENDS+= ${CORE_DEPS} \
|
2011-10-07 15:02:36 +02:00
|
|
|
${MASON_DEPS} \
|
|
|
|
${PSGI_DEPS} \
|
|
|
|
${MAILGATE_DEPS} \
|
|
|
|
${CLI_DEPS} \
|
|
|
|
${ICAL_DEPS} \
|
|
|
|
${SMTP_DEPS} \
|
|
|
|
${DASHBOARDS_DEPS} \
|
2013-07-25 23:33:36 +02:00
|
|
|
${USERLOGO_DEPS} \
|
|
|
|
${HTML_DOC_DEPS}
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2014-07-13 10:43:47 +02:00
|
|
|
USES= cpe perl5
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= autoconf
|
2014-07-13 10:43:47 +02:00
|
|
|
CPE_VENDOR= bestpractical
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2014-01-12 00:04:21 +01:00
|
|
|
RT_ETC_PATH?= ${PREFIX}/etc/${PORTNAME}${PKGNAMESUFFIX}
|
|
|
|
RT_LAYOUT= FreeBSD
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
|
|
|
|
DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
|
|
|
|
|
|
|
|
AP_MODPERL_DESC= Deploy with apache and mod_perl
|
|
|
|
AP_MODPERL_RUN_DEPENDS= ${MODPERL2_DEPS}
|
|
|
|
AP_MODPERL_CONFIGURE_ON= --with-apachectl=${LOCALBASE}/sbin/apachectl
|
|
|
|
|
|
|
|
AP_MODFASTCGI_DESC= Deploy with apache and mod_fastcgi
|
|
|
|
AP_MODFASTCGI_USE= APACHE_RUN=22+
|
|
|
|
AP_MODFASTCGI_RUN_DEPENDS= ${LOCALBASE}/${APACHEMODDIR}/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
|
|
|
|
${FASTCGI_DEPS}
|
|
|
|
AP_MODFASTCGI_CONFIGURE_ON= --with-apachectl=${LOCALBASE}/sbin/apachectl
|
|
|
|
|
|
|
|
LIGHTTPD_DESC= Deploy with lighttpd and mod_fastcgi
|
|
|
|
LIGHTTPD_RUN_DEPENDS= ${LOCALBASE}/sbin/lighttpd:${PORTSDIR}/www/lighttpd
|
|
|
|
|
|
|
|
SPAWN_FCGI_DESC= Deploy with spawn_fcgi
|
|
|
|
SPAWN_FCGI_RUN_DEPENDS= ${LOCALBASE}/bin/spawn-fcgi:${PORTSDIR}/www/spawn-fcgi
|
|
|
|
|
|
|
|
MYSQL_USE= MYSQL=yes
|
|
|
|
MYSQL_RUN_DEPENDS= ${MYSQL_DEPS}
|
|
|
|
|
|
|
|
PGSQL_USE= PGSQL=yes
|
|
|
|
PGSQL_RUN_DEPENDS= ${PGSQL_DEPS}
|
|
|
|
|
|
|
|
ORACLE_RUN_DEPENDS= ${ORACLE_DEPS}
|
|
|
|
|
|
|
|
SQLITE_USE= SQLITE=yes
|
|
|
|
SQLITE_RUN_DEPENDS= ${SQLITE_DEPS}
|
|
|
|
|
|
|
|
DEV_DESC= Configure for Developers
|
|
|
|
DEV_RUN_DEPENDS= ${DEV_DEPS}
|
|
|
|
DEV_CONFIGURE_ON= --enable-developer-mode
|
|
|
|
|
|
|
|
SSL_MAILGATE_DESC= Enable HTTPS support for rt-mailgate
|
|
|
|
SSL_MAILGATE_RUN_DEPENDS= ${SSL_MAILGATE_DEPS}
|
|
|
|
SSL_MAILGATE_CONFIGURE_ENABLE= ssl-mailgate
|
|
|
|
|
|
|
|
GRAPHVIZ_RUN_DEPENDS= ${GRAPHVIZ_DEPS}
|
|
|
|
GRAPHVIZ_CONFIGURE_ENABLE= graphviz
|
|
|
|
|
|
|
|
GPG_DESC= Enable GnuPG support
|
|
|
|
GPG_RUN_DEPENDS= ${GPG_DEPS}
|
|
|
|
GPG_CONFIGURE_ENABLE= gpg
|
|
|
|
|
|
|
|
GD_DESC= Enable GD Graphs and Charts
|
|
|
|
GD_RUN_DEPENDS= ${GD_DEPS}
|
|
|
|
GD_CONFIGURE_ENABLE= gd
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2014-01-19 15:34:39 +01:00
|
|
|
BUILD_DEPENDS+= ${RUN_DEPENDS}
|
|
|
|
|
2014-01-12 00:04:21 +01:00
|
|
|
.include <bsd.port.options.mk>
|
2011-10-07 15:02:36 +02:00
|
|
|
|
2012-06-04 21:25:56 +02:00
|
|
|
.if !${PORT_OPTIONS:MMYSQL} && !${PORT_OPTIONS:MPGSQL} && \
|
|
|
|
! ${PORT_OPTIONS:MORACLE} && !${PORT_OPTIONS:MSQLITE}
|
|
|
|
IGNORE= please select one of MYSQL, PGSQL, ORACLE or SQLITE
|
2008-12-27 04:38:24 +01:00
|
|
|
.endif
|
|
|
|
|
2012-06-04 21:25:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2008-12-27 04:38:24 +01:00
|
|
|
DB_TYPE= mysql
|
2011-10-07 15:02:36 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-04 21:25:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
2008-12-27 04:38:24 +01:00
|
|
|
DB_TYPE= Pg
|
2011-10-07 15:02:36 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-04 21:25:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MORACLE}
|
2011-10-07 15:02:36 +02:00
|
|
|
DB_TYPE= Oracle
|
2012-06-04 21:25:56 +02:00
|
|
|
.endif
|
2011-10-07 15:02:36 +02:00
|
|
|
|
2012-06-04 21:25:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MSQLITE}
|
2008-12-27 04:38:24 +01:00
|
|
|
DB_TYPE= SQLite
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2014-01-12 00:04:21 +01:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
|
|
|
DB_DBA_USER?= pgsql
|
|
|
|
.else
|
2008-12-27 04:38:24 +01:00
|
|
|
DB_DBA_USER?= root
|
2014-01-12 00:04:21 +01:00
|
|
|
.endif
|
2008-12-27 04:38:24 +01:00
|
|
|
DB_DBA_PASSWORD?=
|
|
|
|
DB_USER?= rt_user
|
|
|
|
DB_PASSWORD?= rt_pass
|
|
|
|
DB_HOST?= localhost
|
2011-10-07 15:02:36 +02:00
|
|
|
DB_DATABASE?= rt4
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2009-02-13 15:22:58 +01:00
|
|
|
WEB_USER?= ${WWWOWN}
|
|
|
|
WEB_GROUP?= ${WWWGRP}
|
2008-12-27 04:38:24 +01:00
|
|
|
LIBS_GROUP?= wheel
|
|
|
|
|
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
NO_BUILD= yes
|
|
|
|
|
2012-04-04 09:29:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-layout=${RT_LAYOUT} \
|
2008-12-27 04:38:24 +01:00
|
|
|
--with-web-user=${WEB_USER} \
|
|
|
|
--with-web-group=${WEB_GROUP} \
|
|
|
|
--with-libs-group=${LIBS_GROUP} \
|
|
|
|
--with-db-host=${DB_HOST} \
|
|
|
|
--with-db-port=${DB_PORT} \
|
|
|
|
--with-db-type=${DB_TYPE} \
|
|
|
|
--with-db-rt-user=${DB_USER} \
|
|
|
|
--with-db-rt-pass=${DB_PASSWORD} \
|
|
|
|
--with-db-database=${DB_DATABASE} \
|
|
|
|
--with-db-dba=${DB_DBA_USER}
|
|
|
|
|
2013-08-02 00:04:01 +02:00
|
|
|
CONFIGURE_ENV+= PERL=${LOCALBASE}/bin/perl
|
|
|
|
|
2008-12-27 04:38:24 +01:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
2014-01-12 00:04:21 +01:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
SUB_LIST= RT_ETC_PATH=${RT_ETC_PATH}
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2011-10-07 15:02:36 +02:00
|
|
|
run-autotools: run-autotools-autoconf
|
2008-12-27 04:38:24 +01:00
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} " DB_TYPE=type mysql, Oracle, Pg or SQLite (mysql)"
|
|
|
|
@${ECHO} " DB_HOST=hostname The database host (localhost)"
|
|
|
|
@${ECHO} " DB_PORT=port The database port"
|
2011-10-07 15:02:36 +02:00
|
|
|
@${ECHO} " DB_DATABASE=dbname The database name (rt4)"
|
2008-12-27 04:38:24 +01:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} " DB_DBA_USER=username Name of database administrator (root)"
|
|
|
|
@${ECHO} " DB_DBA_PASSWORD=password Password of database administrator"
|
|
|
|
@${ECHO} " DB_USER=username Name of database user for RT (rt_user)"
|
|
|
|
@${ECHO} " DB_PASSWORD=password Name of database password for RT (rt_pass)"
|
2012-06-04 21:25:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MSQLITE}
|
2008-12-27 04:38:24 +01:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "SQLITE is not recommended for production use"
|
|
|
|
.endif
|
|
|
|
|
2008-12-29 06:35:06 +01:00
|
|
|
post-patch:
|
|
|
|
@${RM} -f ${WRKSRC}/lib/RT.pm.in.orig
|
2009-01-22 21:58:49 +01:00
|
|
|
@${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!g' ${WRKSRC}/config.layout
|
2008-12-29 06:35:06 +01:00
|
|
|
@${REINPLACE_CMD} -e 's!%%SITE_PERL%%!${SITE_PERL}!g' ${WRKSRC}/config.layout
|
2009-02-13 15:22:58 +01:00
|
|
|
@${REINPLACE_CMD} -e 's!/path/to/your/etc!${RT_ETC_PATH}!g' ${WRKSRC}/etc/RT_SiteConfig.pm
|
2009-04-27 15:48:11 +02:00
|
|
|
@${REINPLACE_CMD} -e 's!/bin:/usr/bin!/bin:/usr/bin:${LOCALBASE}/bin!' ${WRKSRC}/lib/RT/Interface/CLI.pm && \
|
|
|
|
${RM} ${WRKSRC}/lib/RT/Interface/CLI.pm.bak
|
2008-12-29 06:35:06 +01:00
|
|
|
|
2008-12-27 04:38:24 +01:00
|
|
|
pre-install:
|
2008-12-29 06:35:06 +01:00
|
|
|
@${RM} -f ${WRKSRC}/lib/RT.pm.in
|
2008-12-27 04:38:24 +01:00
|
|
|
|
|
|
|
post-install:
|
2013-09-27 23:53:44 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}/upgrade
|
2011-11-10 07:15:25 +01:00
|
|
|
(cd ${WRKSRC}/etc && \
|
2013-09-27 23:53:44 +02:00
|
|
|
${COPYTREE_SHARE} upgrade ${STAGEDIR}${DOCSDIR} "! -name *\.in")
|
2008-12-27 04:38:24 +01:00
|
|
|
|
2012-01-05 23:54:15 +01:00
|
|
|
.include <bsd.port.mk>
|