/[gentoo-x86]/www-apps/rt/rt-4.2.11.ebuild
Gentoo

Contents of /www-apps/rt/rt-4.2.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Jul 11 20:38:05 2015 UTC (4 years, 7 months ago) by dilfridge
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
dev-perl/locale-maketext-lexicon just became dev-perl/Locale-Maketext-Lexicon

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0B08240A96F66571)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/rt/rt-4.2.11.ebuild,v 1.2 2015/06/13 17:21:59 dilfridge Exp $
4
5 EAPI=5
6
7 inherit webapp eutils depend.apache user
8
9 DESCRIPTION="RT is an enterprise-grade ticketing system"
10 HOMEPAGE="http://www.bestpractical.com/rt/"
11 SRC_URI="http://download.bestpractical.com/pub/${PN}/release/${P}.tar.gz"
12
13 KEYWORDS="~amd64"
14 LICENSE="GPL-2"
15 IUSE="mysql +postgres fastcgi lighttpd"
16 REQUIRED_USE="^^ ( mysql postgres )"
17
18 RESTRICT="test"
19
20 DEPEND="
21 >=dev-lang/perl-5.10.1
22
23 >=dev-perl/Apache-Session-1.53
24 >=dev-perl/CSS-Squish-0.06
25 >=dev-perl/Class-Accessor-0.34
26 >=dev-perl/Class-ReturnValue-0.550.0-r1
27 >=dev-perl/DBI-1.37
28 >=dev-perl/Date-Extract-0.02
29 >=dev-perl/DateTime-Format-Natural-0.67
30 >=dev-perl/Devel-StackTrace-1.19
31 >=dev-perl/HTML-FormatText-WithLinks-0.14
32 >=dev-perl/HTML-Mason-1.43
33 >=dev-perl/HTML-Scrubber-0.08
34 >=dev-perl/HTTP-Server-Simple-0.34
35 >=dev-perl/HTTP-Server-Simple-Mason-0.14
36 >=dev-perl/Log-Dispatch-2.410.0
37 >=dev-perl/MIME-tools-5.425
38 >=dev-perl/MailTools-1.60
39 >=dev-perl/Module-Versions-Report-1.05
40 >=dev-perl/Role-Basic-0.12
41 >=dev-perl/Symbol-Global-Name-0.04
42 >=dev-perl/Text-Quoted-2.80.0
43 >=dev-perl/Text-WikiFormat-0.76
44 >=dev-perl/Tree-Simple-1.04
45 >=dev-perl/XML-RSS-1.05
46 >=dev-perl/dbix-searchbuilder-1.660.0
47 >=dev-perl/Locale-Maketext-Lexicon-0.32
48 >=dev-perl/CGI-4
49 >=virtual/perl-Digest-MD5-2.27
50 >=virtual/perl-Encode-2.730.0
51 >=virtual/perl-File-Spec-0.8
52 >=virtual/perl-Getopt-Long-2.24
53 >=virtual/perl-Locale-Maketext-1.06
54 >=virtual/perl-Storable-2.08
55 dev-perl/CGI-Emulate-PSGI
56 dev-perl/CGI-PSGI
57 dev-perl/Cache-Simple-TimedExpiry
58 dev-perl/Calendar-Simple
59 dev-perl/Convert-Color
60 dev-perl/Crypt-Eksblowfish
61 dev-perl/Crypt-SSLeay
62 dev-perl/Crypt-X509
63 dev-perl/DBD-SQLite
64 dev-perl/Data-GUID
65 dev-perl/Data-ICal
66 dev-perl/DateManip
67 dev-perl/Devel-GlobalDestruction
68 dev-perl/Email-Address
69 dev-perl/Email-Address-List
70 dev-perl/File-ShareDir
71 dev-perl/File-Which
72 dev-perl/GD
73 dev-perl/GDGraph
74 dev-perl/GDTextUtil
75 dev-perl/GnuPG-Interface
76 dev-perl/GraphViz
77 dev-perl/HTML-Format
78 dev-perl/HTML-FormatText-WithLinks-AndTables
79 dev-perl/HTML-Mason-PSGIHandler
80 dev-perl/HTML-Parser
81 dev-perl/HTML-Quoted
82 dev-perl/HTML-RewriteAttributes
83 dev-perl/HTML-Tree
84 dev-perl/IPC-Run3
85 dev-perl/JSON
86 dev-perl/JavaScript-Minifier
87 dev-perl/MIME-Types
88 dev-perl/Module-Refresh
89 dev-perl/Mozilla-CA
90 dev-perl/Net-CIDR
91 dev-perl/PerlIO-eol
92 dev-perl/Plack
93 dev-perl/Regexp-Common-net-CIDR
94 dev-perl/Regexp-IPv6
95 dev-perl/Starlet
96 dev-perl/String-ShellQuote
97 dev-perl/TermReadKey
98 dev-perl/Text-Password-Pronounceable
99 dev-perl/Time-modules
100 dev-perl/TimeDate
101 dev-perl/UNIVERSAL-require
102 dev-perl/libwww-perl
103 dev-perl/locale-maketext-fuzzy
104 dev-perl/net-server
105 dev-perl/regexp-common
106 dev-perl/text-autoformat
107 dev-perl/text-template
108 dev-perl/text-wrapper
109 virtual/perl-Digest
110 virtual/perl-File-Temp
111 virtual/perl-Scalar-List-Utils
112 virtual/perl-Time-HiRes
113 virtual/perl-libnet
114
115 fastcgi? (
116 dev-perl/FCGI
117 dev-perl/FCGI-ProcManager
118 )
119 !lighttpd? (
120 dev-perl/Apache-DBI
121 !fastcgi? ( >=www-apache/mod_perl-2 )
122 )
123 lighttpd? ( dev-perl/FCGI )
124 mysql? ( >=dev-perl/DBD-mysql-2.1018 )
125 postgres? ( >=dev-perl/DBD-Pg-1.43 )
126 "
127
128 RDEPEND="${DEPEND}
129 virtual/mta
130 !lighttpd? ( ${APACHE2_DEPEND} )
131 lighttpd? (
132 >=www-servers/lighttpd-1.3.13
133 sys-apps/openrc
134 )
135 "
136
137 need_httpd_cgi
138
139 add_user_rt() {
140 # add new user
141 # suexec2 requires uid >= 1000; enewuser is of no help here
142 # From: Mike Frysinger <vapier@gentoo.org>
143 # Date: Fri, 17 Jun 2005 08:41:44 -0400
144 # i'd pick a 5 digit # if i were you
145
146 local euser="rt"
147
148 # first check if username rt exists
149 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
150 # check uid
151 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
152 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
153 ewarn "uid of user rt is less than 1000. suexec2 will not work."
154 ewarn "If you want to use FastCGI, please delete the user 'rt'"
155 ewarn "from your system and re-emerge www-apps/rt"
156 fi
157 return 0 # all is well
158 fi
159
160 # add user
161 # stolen from enewuser
162 local pwrange euid
163
164 pwrange=$(seq 10001 11001)
165 for euid in ${pwrange} ; do
166 [[ -z $(egetent passwd ${euid}) ]] && break
167 done
168 if [[ ${euid} == "11001" ]]; then
169 # she gets around, doesn't she?
170 die "No available uid's found"
171 fi
172
173 elog " - Userid: ${euid}"
174
175 enewuser rt ${euid} -1 /dev/null rt
176 return 0
177 }
178
179 pkg_setup() {
180 webapp_pkg_setup
181
182 ewarn
183 ewarn "If you are upgrading from an existing RT installation"
184 ewarn "make sure to read the related upgrade documentation in"
185 ewarn "${ROOT}usr/share/doc/${PF}."
186 ewarn
187
188 enewgroup rt
189 add_user_rt || die "Could not add user"
190 }
191
192 src_prepare() {
193 # add Gentoo-specific layout
194 cat "${FILESDIR}"/config.layout-gentoo >> config.layout
195 sed -e "s|PREFIX|${ED}/${MY_HOSTROOTDIR}/${PF}|g" \
196 -e "s|HTMLDIR|${ED}/${MY_HTDOCSDIR}|g" \
197 -e 's|/\+|/|g' \
198 -i ./config.layout || die 'config sed failed'
199
200 # don't need to check dev dependencies
201 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" \
202 -i sbin/rt-test-dependencies.in || die 'dev sed failed'
203
204 epatch "${FILESDIR}/rt-makefile-serialize-install-prereqs.patch"
205 }
206
207 src_configure() {
208 local web
209 local myconf
210 local depsconf
211
212 if use mysql ; then
213 myconf="--with-db-type=mysql --with-db-dba=root"
214 depsconf="--with-MYSQL"
215 elif use postgres ; then
216 myconf="--with-db-type=Pg --with-db-dba=postgres"
217 depsconf="--with-PG"
218 else
219 die "Pick a database backend"
220 fi
221
222 if use fastcgi ; then
223 myconf+=" --with-web-handler=fastcgi"
224 web="apache"
225 depsconf+=" --with-FASTCGI"
226 elif use lighttpd ; then
227 myconf+=" --with-web-handler=fastcgi"
228 web="lighttpd"
229 depsconf+=" --with-FASTCGI"
230 else
231 myconf+=" --with-web-handler=modperl2"
232 web="apache"
233 depsconf+=" --with-MODPERL2"
234 fi
235
236 ./configure --enable-layout=Gentoo \
237 --with-bin-owner=rt \
238 --with-libs-owner=rt \
239 --with-libs-group=rt \
240 --with-rt-group=rt \
241 --with-web-user=${web} \
242 --with-web-group=${web} \
243 ${myconf}
244
245 # check for missing deps and ask to report if something is broken
246 /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t
247 if grep -q "MISSING" "${T}"/t; then
248 ewarn "Missing Perl dependency!"
249 ewarn
250 cat "${T}"/t | grep MISSING
251 ewarn
252 ewarn "Please run perl-cleaner. If the problem persists,"
253 ewarn "please file a bug in the Gentoo Bugzilla with the information above"
254 die "Missing dependencies."
255 fi
256 }
257
258 src_compile() { :; }
259
260 src_install() {
261 webapp_src_preinst
262 emake install
263
264 dodoc -r docs/*
265 # Disable compression because `perldoc` doesn't decompress transparently
266 docompress -x /usr/share/doc
267
268 # make sure we don't clobber existing site configuration
269 rm -f "${ED}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
270
271 # fix paths
272 find "${ED}" -type f -print0 | xargs -0 sed -i -e "s:${ED}::g"
273
274 # copy upgrade files
275 insinto "${MY_HOSTROOTDIR}/${PF}"
276 doins -r etc/upgrade
277
278 if use lighttpd ; then
279 newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN}
280 newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN}
281 sed -i -e "s/@@PF@@/${PF}/g" "${ED}"/etc/conf.d/${PN} || die
282 fi
283
284 # require the web server's permissions
285 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var
286 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var/mason_data/obj
287
288 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
289 webapp_hook_script "${FILESDIR}"/reconfig
290
291 webapp_src_install
292 }

  ViewVC Help
Powered by ViewVC 1.1.20