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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed May 28 10:47:14 2014 UTC (5 years, 9 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove old, insecure versions.

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

  ViewVC Help
Powered by ViewVC 1.1.20