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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Nov 18 20:25:29 2014 UTC (5 years, 2 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Refresh rt_apache.conf so that it has a working example appropriate
for the only version in the tree. Added another sed statement in the
ebuild to remove excess slashes. Fixed reconfig so that it actually
does what it's supposed to do, and do so quietly so that the message
isn't lost. Cleaned up postinstall and have it point to our wiki page
instead of an outdated, flash heavy guide. This package now does
everything it promised, but didn't deliver.

(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.9.ebuild,v 1.2 2014/11/16 21:04:09 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/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.2.3
49 >=dev-perl/log-dispatch-2.23
50 >=virtual/perl-CGI-4
51 >=virtual/perl-Digest-MD5-2.27
52 >=virtual/perl-File-Spec-0.8
53 >=virtual/perl-Getopt-Long-2.24
54 >=virtual/perl-Storable-2.08
55 >=virtual/perl-Locale-Maketext-1.06
56 dev-perl/CGI-Emulate-PSGI
57 dev-perl/CGI-PSGI
58 dev-perl/Cache-Simple-TimedExpiry
59 dev-perl/Calendar-Simple
60 dev-perl/Convert-Color
61 dev-perl/Crypt-Eksblowfish
62 dev-perl/Crypt-SSLeay
63 dev-perl/Crypt-X509
64 dev-perl/DBD-SQLite
65 dev-perl/Data-GUID
66 dev-perl/Data-ICal
67 dev-perl/DateManip
68 dev-perl/Devel-GlobalDestruction
69 dev-perl/Email-Address
70 dev-perl/Email-Address-List
71 dev-perl/File-ShareDir
72 dev-perl/File-Which
73 dev-perl/GD
74 dev-perl/GDGraph
75 dev-perl/GDTextUtil
76 dev-perl/GnuPG-Interface
77 dev-perl/GraphViz
78 dev-perl/HTML-Format
79 dev-perl/HTML-FormatText-WithLinks-AndTables
80 dev-perl/HTML-Mason-PSGIHandler
81 dev-perl/HTML-Parser
82 dev-perl/HTML-Quoted
83 dev-perl/HTML-RewriteAttributes
84 dev-perl/HTML-Tree
85 dev-perl/IPC-Run3
86 dev-perl/JSON
87 dev-perl/JavaScript-Minifier
88 dev-perl/MIME-Types
89 dev-perl/Module-Refresh
90 dev-perl/Mozilla-CA
91 dev-perl/Net-CIDR
92 dev-perl/PerlIO-eol
93 dev-perl/Plack
94 dev-perl/Regexp-Common-net-CIDR
95 dev-perl/Regexp-IPv6
96 dev-perl/String-ShellQuote
97 dev-perl/Starlet
98 dev-perl/TermReadKey
99 dev-perl/Text-Password-Pronounceable
100 dev-perl/Time-modules
101 dev-perl/TimeDate
102 dev-perl/UNIVERSAL-require
103 dev-perl/libwww-perl
104 dev-perl/locale-maketext-fuzzy
105 dev-perl/net-server
106 dev-perl/regexp-common
107 dev-perl/text-autoformat
108 dev-perl/text-template
109 dev-perl/text-wrapper
110 virtual/perl-File-Temp
111 virtual/perl-Scalar-List-Utils
112 virtual/perl-Time-HiRes
113 virtual/perl-Digest
114 virtual/perl-libnet
115
116 fastcgi? (
117 dev-perl/FCGI
118 dev-perl/FCGI-ProcManager
119 )
120 !lighttpd? (
121 dev-perl/Apache-DBI
122 !fastcgi? ( >=www-apache/mod_perl-2 )
123 )
124 lighttpd? ( dev-perl/FCGI )
125 mysql? ( >=dev-perl/DBD-mysql-2.1018 )
126 postgres? ( >=dev-perl/DBD-Pg-1.43 )
127 "
128
129 RDEPEND="${DEPEND}
130 virtual/mta
131 !lighttpd? ( ${APACHE2_DEPEND} )
132 lighttpd? (
133 >=www-servers/lighttpd-1.3.13
134 sys-apps/openrc
135 )
136 "
137
138 need_httpd_cgi
139
140 add_user_rt() {
141 # add new user
142 # suexec2 requires uid >= 1000; enewuser is of no help here
143 # From: Mike Frysinger <vapier@gentoo.org>
144 # Date: Fri, 17 Jun 2005 08:41:44 -0400
145 # i'd pick a 5 digit # if i were you
146
147 local euser="rt"
148
149 # first check if username rt exists
150 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
151 # check uid
152 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
153 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
154 ewarn "uid of user rt is less than 1000. suexec2 will not work."
155 ewarn "If you want to use FastCGI, please delete the user 'rt'"
156 ewarn "from your system and re-emerge www-apps/rt"
157 fi
158 return 0 # all is well
159 fi
160
161 # add user
162 # stolen from enewuser
163 local pwrange euid
164
165 pwrange=$(seq 10001 11001)
166 for euid in ${pwrange} ; do
167 [[ -z $(egetent passwd ${euid}) ]] && break
168 done
169 if [[ ${euid} == "11001" ]]; then
170 # she gets around, doesn't she?
171 die "No available uid's found"
172 fi
173
174 elog " - Userid: ${euid}"
175
176 enewuser rt ${euid} -1 /dev/null rt
177 return 0
178 }
179
180 pkg_setup() {
181 webapp_pkg_setup
182
183 ewarn
184 ewarn "If you are upgrading from an existing RT installation"
185 ewarn "make sure to read the related upgrade documentation in"
186 ewarn "${ROOT}usr/share/doc/${PF}."
187 ewarn
188
189 enewgroup rt
190 add_user_rt || die "Could not add user"
191 }
192
193 src_prepare() {
194 # add Gentoo-specific layout
195 cat "${FILESDIR}"/config.layout-gentoo >> config.layout
196 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
197 s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
198
199 # don't need to check dev dependencies
200 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
201 }
202
203 src_configure() {
204 local web
205 local myconf
206 local depsconf
207
208 if use mysql ; then
209 myconf="--with-db-type=mysql --with-db-dba=root"
210 depsconf="--with-MYSQL"
211 elif use postgres ; then
212 myconf="--with-db-type=Pg --with-db-dba=postgres"
213 depsconf="--with-PG"
214 else
215 die "Pick a database backend"
216 fi
217
218 if use fastcgi ; then
219 myconf+=" --with-web-handler=fastcgi"
220 web="apache"
221 depsconf+=" --with-FASTCGI"
222 elif use lighttpd ; then
223 myconf+=" --with-web-handler=fastcgi"
224 web="lighttpd"
225 depsconf+=" --with-FASTCGI"
226 else
227 myconf+=" --with-web-handler=modperl2"
228 web="apache"
229 depsconf+=" --with-MODPERL2"
230 fi
231
232 ./configure --enable-layout=Gentoo \
233 --with-bin-owner=rt \
234 --with-libs-owner=rt \
235 --with-libs-group=rt \
236 --with-rt-group=rt \
237 --with-web-user=${web} \
238 --with-web-group=${web} \
239 ${myconf}
240
241 # check for missing deps and ask to report if something is broken
242 /usr/bin/perl ./sbin/rt-test-dependencies ${depsconf} > "${T}"/t
243 if grep -q "MISSING" "${T}"/t; then
244 ewarn "Missing Perl dependency!"
245 ewarn
246 cat "${T}"/t | grep MISSING
247 ewarn
248 ewarn "Please run perl-cleaner. If the problem persists,"
249 ewarn "please file a bug in the Gentoo Bugzilla with the information above"
250 die "Missing dependencies."
251 fi
252 }
253
254 src_compile() { :; }
255
256 src_install() {
257 webapp_src_preinst
258 emake install
259
260 dodoc "${S}"/docs/UPGRADING*
261 dodoc "${S}"/docs/*.pod
262 dodoc "${S}"/docs/network-diagram.svg
263 cp -R "${S}"/docs/customizing/ "${D}"/usr/share/doc/"${P}"/
264 cp -R "${S}"/docs/extending/ "${D}"/usr/share/doc/"${P}"/
265
266 # make sure we don't clobber existing site configuration
267 rm -f "${D}"/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
268
269 # fix paths
270 find "${D}" -type f -print0 | xargs -0 sed -i -e "s:${D}::g"
271
272 # copy upgrade files
273 insinto "${MY_HOSTROOTDIR}/${PF}"
274 doins -r etc/upgrade
275
276 if use lighttpd ; then
277 newinitd "${FILESDIR}"/${PN}.init.d.2 ${PN}
278 newconfd "${FILESDIR}"/${PN}.conf.d.2 ${PN}
279 sed -i -e "s/@@PF@@/${PF}/g" "${D}"/etc/conf.d/${PN} || die
280 else
281 doins "${FILESDIR}"/{rt_apache2_fcgi.conf,rt_apache2.conf}
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