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

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

  ViewVC Help
Powered by ViewVC 1.1.20