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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Tue Jul 1 16:48:46 2008 UTC (11 years, 7 months ago) by wrobel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Removed vulnerable rt-3.6.3, rt-3.6.6, added rt-3.6.7 (sec issue #230007).
(Portage version: 2.1.4.4)

1 # Copyright 1999-2008 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.6.3.ebuild,v 1.10 2008/04/03 09:57:12 hollow Exp $
4
5 inherit webapp eutils depend.apache
6
7 IUSE="mysql postgres fastcgi lighttpd"
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 ~ppc ~x86"
14
15 DEPEND="
16 >=dev-lang/perl-5.8.3
17
18 >=dev-perl/Params-Validate-0.02
19 dev-perl/Cache-Cache
20 >=dev-perl/Exception-Class-1.14
21 >dev-perl/HTML-Mason-1.23
22 dev-perl/MLDBM
23 dev-perl/FreezeThaw
24 >=virtual/perl-Digest-MD5-2.27
25 >=virtual/perl-CGI-2.92
26 >=virtual/perl-Storable-2.08
27 >=dev-perl/Apache-Session-1.53
28 >=dev-perl/XML-RSS-1.05
29 >=dev-perl/HTTP-Server-Simple-0.07
30 >=dev-perl/HTTP-Server-Simple-Mason-0.09
31 dev-perl/GD
32 dev-perl/GDGraph
33 dev-perl/GDTextUtil
34 >=dev-perl/Text-WikiFormat-0.76
35
36 !lighttpd? (
37 >=dev-perl/Apache-DBI-0.92
38 !fastcgi? ( >=www-apache/libapreq2-2.06
39 >=dev-perl/HTML-Mason-1.31 )
40 fastcgi? ( dev-perl/FCGI )
41 )
42 lighttpd? ( dev-perl/FCGI )
43
44 mysql? ( >=dev-perl/DBD-mysql-2.1018 )
45 postgres? ( >=dev-perl/DBD-Pg-1.43 )
46
47 >=virtual/perl-Getopt-Long-2.24
48
49 dev-perl/HTML-Tree
50 dev-perl/HTML-Format
51 dev-perl/libwww-perl
52
53 dev-perl/Calendar-Simple
54
55 virtual/perl-digest-base
56 >=dev-perl/DBI-1.37
57 dev-perl/Test-Inline
58 >=dev-perl/class-returnvalue-0.40
59 >=dev-perl/dbix-searchbuilder-1.39
60 dev-perl/text-template
61 >=virtual/perl-File-Spec-0.8
62 dev-perl/HTML-Parser
63 >=dev-perl/HTML-Scrubber-0.08
64 virtual/perl-libnet
65 >=dev-perl/log-dispatch-2.0
66 >=virtual/perl-locale-maketext-1.06
67 >=dev-perl/locale-maketext-lexicon-0.32
68 dev-perl/locale-maketext-fuzzy
69 >=dev-perl/MIME-tools-5.417
70 >=dev-perl/MailTools-1.60
71 dev-perl/text-wrapper
72 dev-perl/Time-modules
73 dev-perl/TimeDate
74 virtual/perl-Time-HiRes
75 virtual/perl-File-Temp
76 dev-perl/TermReadKey
77 dev-perl/text-autoformat
78 >=dev-perl/Text-Quoted-1.3
79 >=dev-perl/Tree-Simple-1.04
80 virtual/perl-Scalar-List-Utils
81 dev-perl/Module-Versions-Report
82 dev-perl/Cache-Simple-TimedExpiry
83 dev-perl/UNIVERSAL-require
84 dev-perl/regexp-common
85 "
86
87 RDEPEND="
88 ${DEPEND}
89 virtual/mta
90 !lighttpd? ( ${APACHE2_DEPEND} )
91 lighttpd? ( >=www-servers/lighttpd-1.3.13 )
92 "
93
94 LICENSE="GPL-2"
95
96 add_user_rt() {
97 # add new user
98 # suexec2 requires uid >= 1000; enewuser is of no help here
99 # From: Mike Frysinger <vapier@gentoo.org>
100 # Date: Fri, 17 Jun 2005 08:41:44 -0400
101 # i'd pick a 5 digit # if i were you
102
103 local euser="rt"
104
105 # first check if username rt exists
106 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
107 # check uid
108 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
109 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
110 ewarn "uid of user rt is less than 1000. suexec2 will not work."
111 ewarn "If you want to use FastCGI, please delete the user 'rt'"
112 ewarn "from your system and re-emerge www-apps/rt"
113 epause
114 fi
115 return 0 # all is well
116 fi
117
118 # add user
119 # stolen from enewuser
120 local pwrange euid
121
122 pwrange=$(seq 10001 11001)
123 for euid in ${pwrange} ; do
124 [[ -z $(egetent passwd ${euid}) ]] && break
125 done
126 if [[ ${euid} == "11001" ]]; then
127 # she gets around, doesn't she?
128 die "No available uid's found"
129 fi
130
131 elog " - Userid: ${euid}"
132
133 enewuser rt ${euid} -1 /dev/null rt > /dev/null
134 return 0
135 }
136
137 pkg_setup() {
138 webapp_pkg_setup
139
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 epause 5
147 enewgroup rt >/dev/null
148 add_user_rt || die "Could not add user"
149 }
150
151 src_unpack() {
152 unpack ${A}
153 cd ${S}
154
155 # add Gentoo-specific layout
156 cat ${FILESDIR}/config.layout-gentoo >> config.layout
157 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
158 s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
159
160 # don't need to check dev dependencies
161 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
162 }
163
164 src_compile() {
165
166 local web="apache"
167 useq lighttpd && web="lighttpd"
168
169 local dbtype=""
170 local dba=""
171
172 if useq mysql; then
173 dbtype="--with-db-type=mysql"
174 dba="--with-db-dba=root"
175 fi
176 if useq postgres;then
177 dbtype="--with-db-type=Pg"
178 dba="--with-db-dba=postgres"
179 fi
180 if useq postgres && useq mysql; then
181 ewarn "Both mysql and postgres USE flags enabled, default is mysql."
182 ewarn "You can set the default value in RT_SiteConfig before DB init."
183 dbtype="--with-db-type=mysql"
184 dba="--with-db-dba=root"
185 fi
186
187 ./configure --enable-layout=Gentoo \
188 --with-bin-owner=rt \
189 --with-libs-owner=rt \
190 --with-libs-group=rt \
191 --with-rt-group=rt \
192 --with-web-user=${web} \
193 --with-web-group=${web} \
194 ${dbtype} ${dba}
195
196 # check for missing deps and ask to report if something is broken
197 local myconf="--verbose $(use_with mysql) \
198 $(use_with postgres postgresql) \
199 $(use_with fastcgi) \
200 $(use_with lighttpd fastcgi)"
201 if ! useq fastcgi && ! useq lighttpd ; then
202 myconf="${myconf} --with-modperl2"
203 fi
204
205 /usr/bin/perl ./sbin/rt-test-dependencies ${myconf} > ${T}/t
206 if grep -q "MISSING" ${T}/t; then
207 ewarn "Missing Perl dependency!"
208 ewarn
209 cat ${T}/t | grep MISSING
210 ewarn
211 ewarn "Please run perl-cleaner. If the problem persists,"
212 ewarn "please file a bug in the Gentoo Bugzilla with the information above"
213 die "Missing dependencies."
214 fi
215 }
216
217 src_install() {
218 webapp_src_preinst
219
220 make install
221
222 # make sure we don't clobber existing site configuration
223 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
224
225 # copy upgrade files
226 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
227
228 cd ${D}
229 grep -Rl "${D}" * | xargs dosed
230
231 if useq lighttpd; then
232 newinitd ${FILESDIR}/${PN}.init.d ${PN}
233 newconfd ${FILESDIR}/${PN}.conf.d ${PN}
234 dosed "s/@@PF@@/${PF}/g" /etc/conf.d/${PN}
235 else
236 local CONF="rt_apache2_fcgi.conf rt_apache2.conf"
237 cd ${FILESDIR} && cp ${CONF} ${D}/${MY_HOSTROOTDIR}/${PF}/etc
238 fi
239 webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
240 webapp_hook_script ${FILESDIR}/reconfig
241
242 webapp_serverowned ${MY_HOSTROOTDIR}/${PF}/var
243 webapp_src_install
244 }

  ViewVC Help
Powered by ViewVC 1.1.20