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

Contents of /www-apps/rt/rt-4.2.9-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue May 19 15:49:08 2015 UTC (4 years, 10 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Address security bug 542882. Add patch fixing bug 540014 to serialize
primary build targets while still allowing parallel building on
subtargets. Remove outdated Apache configuration examples fixing bug
544566. Users should follow the online guide.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D1BBFDA0)

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.9-r1.ebuild,v 1.4 2015/05/03 10:53:47 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/DBI-1.37
27 >=dev-perl/Date-Extract-0.02
28 >=dev-perl/DateTime-Format-Natural-0.67
29 >=dev-perl/dbix-searchbuilder-1.660.0
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/MIME-tools-5.425
37 >=dev-perl/MailTools-1.60
38 >=dev-perl/Module-Versions-Report-1.05
39 >=dev-perl/Role-Basic-0.12
40 >=dev-perl/Symbol-Global-Name-0.04
41 >=dev-perl/Text-Quoted-2.80.0
42 >=dev-perl/Text-WikiFormat-0.76
43 >=dev-perl/Tree-Simple-1.04
44 >=dev-perl/XML-RSS-1.05
45 >=dev-perl/Class-ReturnValue-0.40
46 >=dev-perl/dbix-searchbuilder-1.59
47 >=dev-perl/locale-maketext-lexicon-0.32
48 >=dev-perl/Log-Dispatch-2.230.0
49 >=virtual/perl-CGI-4
50 >=virtual/perl-Digest-MD5-2.27
51 >=virtual/perl-File-Spec-0.8
52 >=virtual/perl-Getopt-Long-2.24
53 >=virtual/perl-Storable-2.08
54 >=virtual/perl-Locale-Maketext-1.06
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/String-ShellQuote
96 dev-perl/Starlet
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-File-Temp
110 virtual/perl-Scalar-List-Utils
111 virtual/perl-Time-HiRes
112 virtual/perl-Digest
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
199
200 # don't need to check dev dependencies
201 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
202 }
203
204 src_configure() {
205 local web
206 local myconf
207 local depsconf
208
209 if use mysql ; then
210 myconf="--with-db-type=mysql --with-db-dba=root"
211 depsconf="--with-MYSQL"
212 elif use postgres ; then
213 myconf="--with-db-type=Pg --with-db-dba=postgres"
214 depsconf="--with-PG"
215 else
216 die "Pick a database backend"
217 fi
218
219 if use fastcgi ; then
220 myconf+=" --with-web-handler=fastcgi"
221 web="apache"
222 depsconf+=" --with-FASTCGI"
223 elif use lighttpd ; then
224 myconf+=" --with-web-handler=fastcgi"
225 web="lighttpd"
226 depsconf+=" --with-FASTCGI"
227 else
228 myconf+=" --with-web-handler=modperl2"
229 web="apache"
230 depsconf+=" --with-MODPERL2"
231 fi
232
233 ./configure --enable-layout=Gentoo \
234 --with-bin-owner=rt \
235 --with-libs-owner=rt \
236 --with-libs-group=rt \
237 --with-rt-group=rt \
238 --with-web-user=${web} \
239 --with-web-group=${web} \
240 ${myconf}
241
242 # check for missing deps and ask to report if something is broken
243 /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t
244 if grep -q "MISSING" "${T}"/t; then
245 ewarn "Missing Perl dependency!"
246 ewarn
247 cat "${T}"/t | grep MISSING
248 ewarn
249 ewarn "Please run perl-cleaner. If the problem persists,"
250 ewarn "please file a bug in the Gentoo Bugzilla with the information above"
251 die "Missing dependencies."
252 fi
253 }
254
255 src_compile() { :; }
256
257 src_install() {
258 webapp_src_preinst
259 emake install
260
261 dodoc -r docs
262 # Disable compression because `perldoc` doesn't decompress transparently
263 docompress -x /usr/share/doc
264
265 # make sure we don't clobber existing site configuration
266 rm -f "${ED}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
267
268 # fix paths
269 find "${ED}" -type f -print0 | xargs -0 sed -i -e "s:${ED}::g"
270
271 # copy upgrade files
272 insinto "${MY_HOSTROOTDIR}/${PF}"
273 doins -r etc/upgrade
274
275 if use lighttpd ; then
276 newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN}
277 newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN}
278 sed -i -e "s/@@PF@@/${PF}/g" "${ED}"/etc/conf.d/${PN} || die
279 else
280 doins "${FILESDIR}"/rt_apache2{,_fcgi}.conf
281 fi
282
283 # require the web server's permissions
284 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var
285 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var/mason_data/obj
286
287 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
288 webapp_hook_script "${FILESDIR}"/reconfig
289
290 webapp_src_install
291 }

  ViewVC Help
Powered by ViewVC 1.1.20