2003-04-29 05:10:29 +00:00
|
|
|
# New ports collection makefile for: rt3
|
|
|
|
# Date created: 28 November 2002
|
|
|
|
# Whom: autrijus
|
2002-12-22 04:50:13 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2003-04-29 05:10:29 +00:00
|
|
|
PORTNAME= rt3
|
2003-08-07 13:05:32 +00:00
|
|
|
PORTVERSION?= 3.0.4
|
2003-05-15 09:04:57 +00:00
|
|
|
CATEGORIES= www
|
|
|
|
MASTER_SITES?= http://www.fsck.com/pub/rt/release/ \
|
2003-07-13 10:13:52 +00:00
|
|
|
http://www.fsck.com/pub/rt/devel/ \
|
|
|
|
ftp://ftp.eu.uu.net/pub/unix/ticketing/rt/release/ \
|
|
|
|
ftp://ftp.eu.uu.net/pub/unix/ticketing/rt/devel/
|
2003-05-15 18:59:34 +00:00
|
|
|
DISTFILES?= rt-${PORTVERSION:S/./-/g}.tar.gz
|
2002-12-22 04:50:13 +00:00
|
|
|
|
2003-05-15 09:04:57 +00:00
|
|
|
MAINTAINER= autrijus@autrijus.org
|
2003-05-05 06:32:50 +00:00
|
|
|
COMMENT?= RT is an industrial-grade ticketing system written in Perl
|
2002-12-22 04:50:13 +00:00
|
|
|
|
2003-08-07 13:05:32 +00:00
|
|
|
BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} \
|
2003-04-29 05:10:29 +00:00
|
|
|
${SITE_PERL}/Apache/Mason.pm:${PORTSDIR}/www/p5-HTML-Mason \
|
2002-12-22 04:50:13 +00:00
|
|
|
${SITE_PERL}/Apache/Session.pm:${PORTSDIR}/www/p5-Apache-Session \
|
2003-04-29 05:10:29 +00:00
|
|
|
${SITE_PERL}/Cache/Cache.pm:${PORTSDIR}/devel/p5-Cache-Cache \
|
|
|
|
${SITE_PERL}/CGI/Cookie.pm:${PORTSDIR}/www/p5-CGI.pm \
|
|
|
|
${ARCH_PERL}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
|
|
|
|
${SITE_PERL}/DBIx/SearchBuilder.pm:${PORTSDIR}/databases/p5-DBIx-SearchBuilder \
|
|
|
|
${ARCH_PERL}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
|
|
|
|
${SITE_PERL}/Exception/Class.pm:${PORTSDIR}/devel/p5-Exception-Class \
|
|
|
|
${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp \
|
2002-12-22 04:50:13 +00:00
|
|
|
${SITE_PERL}/FreezeThaw.pm:${PORTSDIR}/devel/p5-FreezeThaw \
|
|
|
|
${SITE_PERL}/Getopt/Long.pm:${PORTSDIR}/devel/p5-Getopt-Long \
|
2003-04-29 05:10:29 +00:00
|
|
|
${ARCH_PERL}/HTML/Entities.pm:${PORTSDIR}/www/p5-HTML-Parser \
|
2003-06-20 08:41:24 +00:00
|
|
|
${SITE_PERL}/HTML/FormatText.pm:${PORTSDIR}/textproc/p5-HTML-Format \
|
2003-04-29 05:10:29 +00:00
|
|
|
${SITE_PERL}/HTML/TreeBuilder.pm:${PORTSDIR}/www/p5-HTML-Tree \
|
|
|
|
${SITE_PERL}/Locale/Maketext.pm:${PORTSDIR}/devel/p5-Locale-Maketext \
|
|
|
|
${SITE_PERL}/Locale/Maketext/Fuzzy.pm:${PORTSDIR}/devel/p5-Locale-Maketext-Fuzzy \
|
|
|
|
${SITE_PERL}/Locale/Maketext/Lexicon.pm:${PORTSDIR}/devel/p5-Locale-Maketext-Lexicon \
|
2002-12-22 04:50:13 +00:00
|
|
|
${SITE_PERL}/Log/Dispatch.pm:${PORTSDIR}/devel/p5-Log-Dispatch \
|
2003-04-29 05:10:29 +00:00
|
|
|
${SITE_PERL}/Mail/Mailer.pm:${PORTSDIR}/mail/p5-Mail-Tools \
|
2002-12-22 04:50:13 +00:00
|
|
|
${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \
|
|
|
|
${SITE_PERL}/MLDBM.pm:${PORTSDIR}/databases/p5-MLDBM \
|
|
|
|
${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
|
2003-04-29 05:10:29 +00:00
|
|
|
${ARCH_PERL}/Params/Validate.pm:${PORTSDIR}/devel/p5-Params-Validate \
|
|
|
|
${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \
|
|
|
|
${ARCH_PERL}/Storable.pm:${PORTSDIR}/devel/p5-Storable \
|
|
|
|
${ARCH_PERL}/Term/ReadKey.pm:${PORTSDIR}/devel/p5-Term-ReadKey \
|
|
|
|
${SITE_PERL}/Text/Autoformat.pm:${PORTSDIR}/textproc/p5-Text-Autoformat \
|
|
|
|
${SITE_PERL}/Text/Quoted.pm:${PORTSDIR}/textproc/p5-Text-Quoted \
|
2002-12-22 04:50:13 +00:00
|
|
|
${SITE_PERL}/Text/Template.pm:${PORTSDIR}/textproc/p5-Text-Template \
|
|
|
|
${SITE_PERL}/Text/Wrapper.pm:${PORTSDIR}/textproc/p5-Text-Wrapper \
|
2003-04-29 05:10:29 +00:00
|
|
|
${ARCH_PERL}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
|
2003-05-12 08:10:13 +00:00
|
|
|
${SITE_PERL}/Time/ParseDate.pm:${PORTSDIR}/devel/p5-Time-modules \
|
2003-04-29 05:10:29 +00:00
|
|
|
${SITE_PERL}/WWW/Mechanize.pm:${PORTSDIR}/www/p5-WWW-Mechanize
|
2003-05-15 09:04:57 +00:00
|
|
|
RUN_DEPENDS= ${BUILD_DEPENDS}
|
2003-04-29 05:10:29 +00:00
|
|
|
|
2003-08-07 13:05:32 +00:00
|
|
|
WRKSRC?= ${WRKDIR}/rt-${PORTVERSION:S/./-/g}
|
2003-05-15 09:04:57 +00:00
|
|
|
HAS_CONFIGURE= yes
|
2003-05-08 14:36:40 +00:00
|
|
|
NO_BUILD= yes
|
|
|
|
NO_PACKAGE= Executes scripts in post-install phase
|
2003-04-29 05:10:29 +00:00
|
|
|
|
2003-05-15 09:04:57 +00:00
|
|
|
CONFIGURE_ARGS= --prefix=${RT_PATH} \
|
2003-04-29 05:10:29 +00:00
|
|
|
--enable-layout=${LAYOUT} \
|
|
|
|
--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-dba=${DB_DBA_USER}
|
|
|
|
|
2003-06-11 09:57:42 +00:00
|
|
|
.if defined(WITH_FASTCGI)
|
|
|
|
APACHE_PORT?= ${PORTSDIR}/www/apache13
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
|
|
|
|
${ARCH_PERL}/FCGI.pm:${PORTSDIR}/www/p5-FastCGI
|
2003-06-12 09:15:38 +00:00
|
|
|
DEPENDS_ARGS+= WITHOUT_MODPERL=yes
|
2003-06-11 09:57:42 +00:00
|
|
|
.else
|
|
|
|
BUILD_DEPENDS+= ${SITE_PERL}/Apache/DBI.pm:${PORTSDIR}/www/p5-Apache-DBI
|
2003-04-29 05:10:29 +00:00
|
|
|
.if defined(WITH_APACHE2)
|
2003-05-15 09:04:57 +00:00
|
|
|
APACHE_PORT?= ${PORTSDIR}/www/apache2
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache2/mod_perl.so:${PORTSDIR}/www/mod_perl2
|
2003-06-20 08:41:24 +00:00
|
|
|
DEPENDS_ARGS+= WITHOUT_MODPERL=yes
|
|
|
|
DEPENDS_ARGS+= WITH_MODPERL2=yes
|
2003-04-29 05:10:29 +00:00
|
|
|
.else
|
2003-05-15 09:04:57 +00:00
|
|
|
APACHE_PORT?= ${PORTSDIR}/www/apache13
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/libperl.so:${PORTSDIR}/www/mod_perl
|
2003-04-29 05:10:29 +00:00
|
|
|
.endif
|
2003-06-11 09:57:42 +00:00
|
|
|
.endif
|
2003-04-29 05:10:29 +00:00
|
|
|
|
2003-05-15 09:04:57 +00:00
|
|
|
APXS?= ${LOCALBASE}/sbin/apxs
|
2002-12-22 04:50:13 +00:00
|
|
|
|
2003-05-15 09:04:57 +00:00
|
|
|
DB_TYPE?= mysql
|
2002-12-22 04:50:13 +00:00
|
|
|
|
|
|
|
.if ${DB_TYPE} == "Pg"
|
2003-05-15 18:59:34 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/psql:${PORTSDIR}/databases/postgresql7 \
|
|
|
|
${ARCH_PERL}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
|
2002-12-22 04:50:13 +00:00
|
|
|
.else
|
2003-05-15 09:04:57 +00:00
|
|
|
DB_TYPE= mysql
|
2003-05-15 18:59:34 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/mysql_config:${PORTSDIR}/databases/mysql40-server
|
2002-12-22 04:50:13 +00:00
|
|
|
.endif
|
|
|
|
|
2003-04-29 05:10:29 +00:00
|
|
|
SITE_PERL:= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
|
|
|
|
ARCH_PERL= ${SITE_PERL}/${PERL_ARCH}/
|
2003-05-15 09:04:57 +00:00
|
|
|
USE_PERL5= yes
|
|
|
|
RT_PATH?= ${PREFIX}/rt3
|
2003-04-29 10:24:14 +00:00
|
|
|
LAYOUT?= RT3
|
2002-12-22 04:50:13 +00:00
|
|
|
|
2003-04-29 05:10:29 +00:00
|
|
|
DB_DBA_USER?= root
|
2002-12-22 04:50:13 +00:00
|
|
|
DB_HOST?= localhost
|
2003-05-05 05:10:35 +00:00
|
|
|
DB_DBA_PASSWORD?=
|
2003-04-29 05:10:29 +00:00
|
|
|
|
2003-05-08 14:36:40 +00:00
|
|
|
WEB_USER?= www
|
|
|
|
WEB_GROUP?= www
|
2003-04-29 05:10:29 +00:00
|
|
|
LIBS_GROUP?= wheel
|
2002-12-22 04:50:13 +00:00
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "You may use the following build options:"
|
|
|
|
@${ECHO} ""
|
2003-04-29 05:10:29 +00:00
|
|
|
@${ECHO} " DB_TYPE=type Pg for postgresql, mysql for MySQL (mysql)"
|
|
|
|
@${ECHO} " DB_HOST=hostname The database host (localhost)"
|
|
|
|
@${ECHO} " DB_PORT=port The database port"
|
|
|
|
@${ECHO} " DB_DBA_USER=password Name of database administrator (root)"
|
|
|
|
@${ECHO} " DB_DBA_PASSWORD=password Password of database administrator"
|
2003-06-11 09:57:42 +00:00
|
|
|
@${ECHO} " WITH_FASTCGI Use FastCGI instead of mod_perl"
|
2003-04-29 05:10:29 +00:00
|
|
|
@${ECHO} " WITH_APACHE2 Use Apache2 as the web server"
|
2003-06-21 09:30:41 +00:00
|
|
|
@${ECHO} " INITIAL_INSTALL Do initialize DB (for initial install only)"
|
2002-12-22 04:50:13 +00:00
|
|
|
@${ECHO} ""
|
|
|
|
|
2003-05-08 15:15:06 +00:00
|
|
|
pre-install:
|
|
|
|
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} \
|
|
|
|
${PKGNAME} PRE-INSTALL
|
2003-02-12 11:36:57 +00:00
|
|
|
|
2002-12-22 04:50:13 +00:00
|
|
|
post-install:
|
2003-05-15 18:59:34 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/README ${RT_PATH}/README
|
2003-06-20 08:41:24 +00:00
|
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/ap2mp2-fix.pl ${RT_PATH}/bin
|
2003-06-21 09:30:41 +00:00
|
|
|
.if !defined(INITIAL_INSTALL)
|
2003-04-29 05:10:29 +00:00
|
|
|
@echo Upgrade of RT3 complete.
|
|
|
|
.else
|
|
|
|
-@${PERL} $(RT_PATH)/sbin/rt-setup-database --force --action drop --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
|
|
|
|
-@${PERL} $(RT_PATH)/sbin/rt-setup-database --force --action init --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
|
|
|
|
@${SED} s!%%RT_PATH%%!${RT_PATH}!g ${PKGMESSAGE}
|
2003-02-12 11:36:57 +00:00
|
|
|
.endif
|
|
|
|
|
2003-05-05 05:10:35 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${PERL_LEVEL} < 500601
|
|
|
|
IGNORE= This program only support perl 5.6.1 or above
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PERL_LEVEL} == 500601
|
2003-05-05 06:32:50 +00:00
|
|
|
BUILD_DEPENDS+= ${SITE_PERL}/Encode/compat.pm:${PORTSDIR}/devel/p5-Encode-compat \
|
|
|
|
${ARCH_PERL}/Text/Iconv.pm:${PORTSDIR}/converters/p5-Text-Iconv
|
2003-05-05 05:10:35 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|