update Tue Apr 13 18:37:00 PDT 2010
[pkgsrc.git] / devel / rt3 / Makefile
1 # $NetBSD: Makefile,v 1.43 2010/04/13 21:06:30 spz Exp $
2
3 DISTNAME=               rt-3.8.7
4 CATEGORIES=             devel
5 MASTER_SITES=           http://download.bestpractical.com/pub/rt/release/
6 PKGREVISION=            2
7
8 MAINTAINER=             spz@NetBSD.org
9 HOMEPAGE=               http://bestpractical.com/rt/
10 COMMENT=                Industrial-grade ticketing system
11 LICENSE=                gnu-gpl-v2
12
13 PKG_DESTDIR_SUPPORT=    destdir
14
15 .include "options.mk"
16
17 USE_TOOLS+=     perl:run
18 USE_LANGUAGES+= c
19
20 # Core dependencies:
21 DEPENDS+=       p5-Digest-[0-9]*:../../security/p5-Digest
22 DEPENDS+=       p5-Digest-MD5>=2.27:../../security/p5-Digest-MD5
23 DEPENDS+=       p5-DBI>=1.37:../../databases/p5-DBI
24 DEPENDS+=       p5-Class-ReturnValue>=0.40:../../devel/p5-Class-ReturnValue
25 DEPENDS+=       p5-TimeDate-[0-9]*:../../time/p5-TimeDate
26 DEPENDS+=       p5-DBIx-SearchBuilder>=1.54:../../databases/p5-DBIx-SearchBuilder
27 DEPENDS+=       p5-Text-Template>=1.43:../../textproc/p5-Text-Template
28 DEPENDS+=       p5-HTML-Parser>=3.35:../../www/p5-HTML-Parser
29 DEPENDS+=       p5-HTML-Scrubber>=0.08:../../www/p5-HTML-Scrubber
30 DEPENDS+=       p5-HTTP-Server-Simple>=0.34:../../www/p5-HTTP-Server-Simple
31 DEPENDS+=       p5-HTTP-Server-Simple-Mason>=0.09:../../www/p5-HTTP-Server-Simple-Mason
32 DEPENDS+=       p5-Log-Dispatch>=2.0:../../devel/p5-Log-Dispatch
33 DEPENDS+=       p5-Locale-Maketext>=1.06:../../misc/p5-Locale-Maketext
34 DEPENDS+=       p5-Locale-Maketext-Lexicon>=0.32:../../misc/p5-Locale-Maketext-Lexicon
35 DEPENDS+=       p5-Locale-Maketext-Fuzzy>=0.02:../../misc/p5-Locale-Maketext-Fuzzy
36 DEPENDS+=       p5-MIME-tools>=5.411.1:../../mail/p5-MIME-tools
37 DEPENDS+=       p5-MailTools>=1.57:../../mail/p5-MailTools
38 DEPENDS+=       p5-Email-Address-[0-9]*:../../mail/p5-Email-Address
39 DEPENDS+=       p5-Net>=1.15:../../net/p5-Net
40 DEPENDS+=       p5-Net-Server-[0-9]*:../../net/p5-Net-Server
41 DEPENDS+=       p5-Text-Wrapper>=1.0:../../textproc/p5-Text-Wrapper
42 DEPENDS+=       p5-Time-modules>=101.062101:../../time/p5-Time-modules
43 DEPENDS+=       p5-Text-Autoformat>=1.04:../../textproc/p5-Text-Autoformat
44 DEPENDS+=       p5-Text-Quoted>=2.02:../../textproc/p5-Text-Quoted
45 DEPENDS+=       p5-Tree-Simple>=1.04:../../devel/p5-Tree-Simple
46 DEPENDS+=       p5-Regexp-Common>=2.113:../../textproc/p5-Regexp-Common
47 DEPENDS+=       p5-Module-Versions-Report>=1.05:../../devel/p5-Module-Versions-Report
48 DEPENDS+=       p5-Cache-Simple-TimedExpiry-[0-9]*:../../devel/p5-Cache-Simple-TimedExpiry
49 DEPENDS+=       p5-UNIVERSAL-require>=0.11:../../devel/p5-UNIVERSAL-require
50 DEPENDS+=       p5-Calendar-Simple>=1.00:../../time/p5-Calendar-Simple
51 DEPENDS+=       p5-CSS-Squish>=0.07:../../www/p5-CSS-Squish
52 DEPENDS+=       p5-File-ShareDir>=1.00:../../devel/p5-File-ShareDir
53
54 # Mason dependencies:
55 DEPENDS+=       p5-HTML-Mason>=1.36:../../www/p5-HTML-Mason
56 DEPENDS+=       p5-Apache-Session>=1.53:../../www/p5-Apache-Session
57 DEPENDS+=       p5-XML-RSS>=1.05:../../textproc/p5-XML-RSS
58 DEPENDS+=       p5-GD-[0-9]*:../../graphics/p5-GD
59 DEPENDS+=       p5-GDGraph-[0-9]*:../../graphics/p5-GDGraph
60 DEPENDS+=       p5-GDTextUtil-[0-9]*:../../graphics/p5-GDTextUtil
61 DEPENDS+=       p5-Text-WikiFormat>=0.76:../../textproc/p5-Text-WikiFormat
62 DEPENDS+=       p5-Module-Refresh>=0.03:../../devel/p5-Module-Refresh
63 DEPENDS+=       p5-Encode>=2.13:../../textproc/p5-Encode
64
65 # Mailgate dependencies:
66 DEPENDS+=       p5-HTML-Tree>=3.18:../../www/p5-HTML-Tree
67 DEPENDS+=       p5-HTML-Format>=2.03:../../www/p5-HTML-Format
68 DEPENDS+=       p5-libwww>=5.76:../../www/p5-libwww
69 DEPENDS+=       p5-Term-ReadKey>=2.21:../../devel/p5-Term-ReadKey
70
71 # Dashboard dependencies:
72 DEPENDS+=       p5-MIME-Types-[0-9]*:../../mail/p5-MIME-Types
73 DEPENDS+=       p5-HTML-RewriteAttributes>=0.02:../../www/p5-HTML-RewriteAttributes
74
75 # ICAL dependencies:
76 DEPENDS+=       p5-Data-ICal-[0-9]*:../../time/p5-Data-ICal
77
78 # GPG dependencies:
79 DEPENDS+=       p5-PerlIO-eol-[0-9]*:../../devel/p5-PerlIO-eol
80 DEPENDS+=       p5-GnuPG-Interface-[0-9]*:../../security/p5-GnuPG-Interface
81
82 # Front-end dependencies:
83 .if !empty(PKG_OPTIONS:Mmodperl1)
84 DEPENDS+=       p5-libapreq>=1.2:../../www/p5-libapreq
85 DEPENDS+=       p5-Apache-DBI>=0.92:../../databases/p5-Apache-DBI
86 .elif !empty(PKG_OPTIONS:Mmodperl2)
87 DEPENDS+=       p5-Apache-DBI>=0.92:../../databases/p5-Apache-DBI
88 .elif !empty(PKG_OPTIONS:Mfastcgi)
89 DEPENDS+=       p5-FCGI>=0.67:../../www/p5-FCGI
90 DEPENDS+=       p5-CGI>=3.38:../../www/p5-CGI
91 .endif
92 PLIST_VARS+=    speedycgi
93 .if !empty(PKG_OPTIONS:Mspeedycgi)
94 DEPENDS+=       SpeedyCGI-[0-9]*:../../www/SpeedyCGI
95 PLIST.speedycgi=yes
96 .else
97 MAKE_FLAGS+=    RT_SPEEDYCGI_HANDLER=""
98
99 .PHONY: rm-speedycgi
100 post-install: rm-speedycgi
101 rm-speedycgi:
102         rm -f ${DESTDIR}${PREFIX}/bin/mason_handler.scgi
103 .endif
104
105 # Back-end dependencies
106 .if !empty(PKG_OPTIONS:Mmysql)
107 DEPENDS+=       p5-DBD-mysql>=2.1018:../../databases/p5-DBD-mysql
108 _RT_DB_TYPE=    mysql
109 .elif !empty(PKG_OPTIONS:Mpgsql)
110 DEPENDS+=       p5-DBD-postgresql>=1.43:../../databases/p5-DBD-postgresql
111 _RT_DB_TYPE=    Pg
112 .elif !empty(PKG_OPTIONS:Moracle)
113 DEPENDS+=       p5-DBD-Oracle-[0-9]*:../../databases/p5-DBD-Oracle
114 _RT_DB_TYPE=    Oracle
115 .elif !empty(PKG_OPTIONS:Msqlite)
116 DEPENDS+=       p5-DBD-SQLite>=1.00:../../databases/p5-DBD-SQLite
117 _RT_DB_TYPE=    SQLite
118 .endif
119
120 # "Development" dependencies:
121 # XML::Simple is required by the installed script
122 # PREFIX/sbin/rt-dump-database
123 DEPENDS+=       p5-XML-Simple-[0-9]*:../../textproc/p5-XML-Simple
124
125 USE_PKGLOCALEDIR=       yes
126 GNU_CONFIGURE=          yes
127 NO_BUILD=               yes
128 PKG_SYSCONFSUBDIR=      rt3
129
130 PKG_GROUPS=             ${RT_GROUP}
131 PKG_GROUPS_VARS+=       RT_GROUP APACHE_GROUP
132 PKG_USERS_VARS+=        APACHE_USER
133
134 CONFIGURE_ARGS+=        --enable-layout=pkgsrc
135 CONFIGURE_ARGS+=        --with-rt-group=${RT_GROUP:Q}
136 CONFIGURE_ARGS+=        --with-db-type=${_RT_DB_TYPE:Q}
137 CONFIGURE_ARGS+=        --with-web-user=${APACHE_USER:Q}
138 CONFIGURE_ARGS+=        --with-web-group=${APACHE_GROUP:Q}
139 CONFIGURE_ARGS+=        --with-speedycgi=${PERL5_INSTALLVENDORBIN}/speedy
140 MESSAGE_SUBST+=         HOMEPAGE=${HOMEPAGE:Q}
141 MESSAGE_SUBST+=         RT_GROUP=${RT_GROUP:Q}
142 MESSAGE_SUBST+=         PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
143
144 post-extract:
145         cd ${WRKSRC} && chmod -R g-w .
146
147 .include "Makefile.install"
148
149 .include "../../mk/bsd.pkg.mk"