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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Nov 16 16:37:12 2014 UTC (5 years, 3 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Version bump fixes bug 528444.

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

1 # Copyright 1999-2014 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.4.ebuild,v 1.6 2014/09/29 13:27:03 titanofold 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/Devel-StackTrace-1.19
30 >=dev-perl/HTML-FormatText-WithLinks-0.14
31 >=dev-perl/HTML-Mason-1.43
32 >=dev-perl/HTML-Scrubber-0.08
33 >=dev-perl/HTTP-Server-Simple-0.34
34 >=dev-perl/HTTP-Server-Simple-Mason-0.14
35 >=dev-perl/MIME-tools-5.425
36 >=dev-perl/MailTools-1.60
37 >=dev-perl/Module-Versions-Report-1.05
38 >=dev-perl/Role-Basic-0.12
39 >=dev-perl/Symbol-Global-Name-0.04
40 >=dev-perl/Text-Quoted-2.80.0
41 >=dev-perl/Text-WikiFormat-0.76
42 >=dev-perl/Tree-Simple-1.04
43 >=dev-perl/XML-RSS-1.05
44 >=dev-perl/class-returnvalue-0.40
45 >=dev-perl/dbix-searchbuilder-1.59
46 >=dev-perl/locale-maketext-lexicon-0.32
47 >=dev-perl/log-dispatch-2.2.3
48 >=dev-perl/log-dispatch-2.23
49 >=virtual/perl-CGI-3.38
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? ( dev-perl/Apache-DBI )
120 lighttpd? ( dev-perl/FCGI )
121 mysql? ( >=dev-perl/DBD-mysql-2.1018 )
122 postgres? ( >=dev-perl/DBD-Pg-1.43 )
123 "
124
125 RDEPEND="${DEPEND}
126 virtual/mta
127 !lighttpd? ( ${APACHE2_DEPEND} )
128 lighttpd? (
129 >=www-servers/lighttpd-1.3.13
130 sys-apps/openrc
131 )
132 "
133
134 need_httpd_cgi
135
136 add_user_rt() {
137 # add new user
138 # suexec2 requires uid >= 1000; enewuser is of no help here
139 # From: Mike Frysinger <vapier@gentoo.org>
140 # Date: Fri, 17 Jun 2005 08:41:44 -0400
141 # i'd pick a 5 digit # if i were you
142
143 local euser="rt"
144
145 # first check if username rt exists
146 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
147 # check uid
148 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
149 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
150 ewarn "uid of user rt is less than 1000. suexec2 will not work."
151 ewarn "If you want to use FastCGI, please delete the user 'rt'"
152 ewarn "from your system and re-emerge www-apps/rt"
153 fi
154 return 0 # all is well
155 fi
156
157 # add user
158 # stolen from enewuser
159 local pwrange euid
160
161 pwrange=$(seq 10001 11001)
162 for euid in ${pwrange} ; do
163 [[ -z $(egetent passwd ${euid}) ]] && break
164 done
165 if [[ ${euid} == "11001" ]]; then
166 # she gets around, doesn't she?
167 die "No available uid's found"
168 fi
169
170 elog " - Userid: ${euid}"
171
172 enewuser rt ${euid} -1 /dev/null rt
173 return 0
174 }
175
176 pkg_setup() {
177 webapp_pkg_setup
178
179 ewarn
180 ewarn "If you are upgrading from an existing RT installation"
181 ewarn "make sure to read the related upgrade documentation in"
182 ewarn "${ROOT}usr/share/doc/${PF}."
183 ewarn
184
185 enewgroup rt
186 add_user_rt || die "Could not add user"
187 }
188
189 src_prepare() {
190 # add Gentoo-specific layout
191 cat "${FILESDIR}"/config.layout-gentoo >> config.layout
192 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
193 s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
194
195 # don't need to check dev dependencies
196 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
197 }
198
199 src_configure() {
200 local web
201 local myconf
202 local depsconf
203
204 if use mysql ; then
205 myconf="--with-db-type=mysql --with-db-dba=root"
206 depsconf="--with-MYSQL"
207 elif use postgres ; then
208 myconf="--with-db-type=Pg --with-db-dba=postgres"
209 depsconf="--with-PG"
210 else
211 die "Pick a database backend"
212 fi
213
214 if use fastcgi ; then
215 myconf+=" --with-web-handler=fastcgi"
216 web="apache"
217 depsconf+=" --with-FASTCGI"
218 elif use lighttpd ; then
219 myconf+=" --with-web-handler=fastcgi"
220 web="lighttpd"
221 depsconf+=" --with-FASTCGI"
222 else
223 myconf+=" --with-web-handler=modperl2"
224 web="apache"
225 depsconf+=" --with-MODPERL2"
226 fi
227
228 ./configure --enable-layout=Gentoo \
229 --with-bin-owner=rt \
230 --with-libs-owner=rt \
231 --with-libs-group=rt \
232 --with-rt-group=rt \
233 --with-web-user=${web} \
234 --with-web-group=${web} \
235 ${myconf}
236
237 # check for missing deps and ask to report if something is broken
238 /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t
239 if grep -q "MISSING" "${T}"/t; then
240 ewarn "Missing Perl dependency!"
241 ewarn
242 cat "${T}"/t | grep MISSING
243 ewarn
244 ewarn "Please run perl-cleaner. If the problem persists,"
245 ewarn "please file a bug in the Gentoo Bugzilla with the information above"
246 die "Missing dependencies."
247 fi
248 }
249
250 src_compile() { :; }
251
252 src_install() {
253 webapp_src_preinst
254 emake install
255
256 dodoc "${S}"/docs/UPGRADING*
257 dodoc "${S}"/docs/*.pod
258 dodoc "${S}"/docs/network-diagram.svg
259 cp -R "${S}"/docs/customizing/ "${D}"/usr/share/doc/"${P}"/
260 cp -R "${S}"/docs/extending/ "${D}"/usr/share/doc/"${P}"/
261
262 # make sure we don't clobber existing site configuration
263 rm -f "${D}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
264
265 # fix paths
266 find "${D}" -type f -print0 | xargs -0 sed -i -e "s:${D}::g"
267
268 # copy upgrade files
269 insinto "${MY_HOSTROOTDIR}/${PF}"
270 doins -r etc/upgrade
271
272 if use lighttpd ; then
273 newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN}
274 newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN}
275 sed -i -e "s/@@PF@@/${PF}/g" "${D}"/etc/conf.d/${PN} || die
276 else
277 doins "${FILESDIR}"/{rt_apache2_fcgi.conf,rt_apache2.conf}
278 fi
279
280 # require the web server's permissions
281 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var
282 webapp_serverowned "${MY_HOSTROOTDIR}"/${PF}/var/mason_data/obj
283
284 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
285 webapp_hook_script "${FILESDIR}"/reconfig
286
287 webapp_src_install
288 }

  ViewVC Help
Powered by ViewVC 1.1.20