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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.20 - (show annotations) (download)
Fri Mar 7 14:37:28 2008 UTC (12 years ago) by hollow
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +1 -1 lines
FILE REMOVED
version bump wrt #195351; ebuild cleanup wrt #208584
(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.4.5.ebuild,v 1.19 2008/02/05 15:04:28 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/Text-WikiFormat
32
33 !lighttpd? (
34 >=dev-perl/Apache-DBI-0.92
35 !fastcgi? ( >=www-apache/libapreq2-2.06
36 >=dev-perl/HTML-Mason-1.31 )
37 fastcgi? ( dev-perl/FCGI )
38 )
39 lighttpd? ( dev-perl/FCGI )
40
41 mysql? ( >=dev-perl/DBD-mysql-2.1018 )
42 postgres? ( >=dev-perl/DBD-Pg-1.41 )
43
44 >=virtual/perl-Getopt-Long-2.24
45
46 dev-perl/HTML-Tree
47 dev-perl/HTML-Format
48 dev-perl/libwww-perl
49
50 virtual/perl-digest-base
51 >=dev-perl/DBI-1.37
52 dev-perl/Test-Inline
53 >=dev-perl/class-returnvalue-0.40
54 >=dev-perl/dbix-searchbuilder-1.35
55 dev-perl/text-template
56 >=virtual/perl-File-Spec-0.8
57 dev-perl/HTML-Parser
58 >=dev-perl/HTML-Scrubber-0.08
59 virtual/perl-libnet
60 >=dev-perl/log-dispatch-2.0
61 >=dev-perl/locale-maketext-lexicon-0.32
62 dev-perl/locale-maketext-fuzzy
63 >=dev-perl/MIME-tools-5.417
64 >=dev-perl/MailTools-1.60
65 dev-perl/text-wrapper
66 dev-perl/Time-modules
67 virtual/perl-File-Temp
68 dev-perl/TermReadKey
69 dev-perl/text-autoformat
70 >=dev-perl/Text-Quoted-1.3
71 >=dev-perl/Tree-Simple-1.04
72 virtual/perl-Scalar-List-Utils
73 dev-perl/Module-Versions-Report
74 dev-perl/Cache-Simple-TimedExpiry
75 dev-perl/XML-Simple
76 dev-perl/regexp-common
77 "
78
79 RDEPEND="
80 ${DEPEND}
81 virtual/mta
82 !lighttpd? ( ${APACHE2_DEPEND} )
83 lighttpd? ( >=www-servers/lighttpd-1.3.13 )
84 "
85
86 LICENSE="GPL-2"
87
88 add_user_rt() {
89 # add new user
90 # suexec2 requires uid >= 1000; enewuser is of no help here
91 # From: Mike Frysinger <vapier@gentoo.org>
92 # Date: Fri, 17 Jun 2005 08:41:44 -0400
93 # i'd pick a 5 digit # if i were you
94
95 local euser="rt"
96
97 # first check if username rt exists
98 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
99 # check uid
100 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
101 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
102 ewarn "uid of user rt is less than 1000. suexec2 will not work."
103 ewarn "If you want to use FastCGI, please delete the user 'rt'"
104 ewarn "from your system and re-emerge www-apps/rt"
105 epause
106 fi
107 return 0 # all is well
108 fi
109
110 # add user
111 # stolen from enewuser
112 local pwrange euid
113
114 pwrange=$(seq 10001 11001)
115 for euid in ${pwrange} ; do
116 [[ -z $(egetent passwd ${euid}) ]] && break
117 done
118 if [[ ${euid} == "11001" ]]; then
119 # she gets around, doesn't she?
120 die "No available uid's found"
121 fi
122
123 elog " - Userid: ${euid}"
124
125 enewuser rt ${euid} -1 /dev/null rt > /dev/null
126 return 0
127 }
128
129 pkg_setup() {
130 webapp_pkg_setup
131
132 use mysql && ewarn "RT needs MySQL with innodb support"
133 ewarn
134 ewarn "If you are upgrading from an existing _RT2_ installation,"
135 ewarn "stop this ebuild (Ctrl-C now), download the upgrade tool,"
136 ewarn "http://bestpractical.com/pub/rt/devel/rt2-to-rt3.tar.gz"
137 ewarn "and follow the included instructions."
138 ewarn
139 epause 5
140 enewgroup rt >/dev/null
141 add_user_rt || die "Could not add user"
142
143 }
144
145 src_unpack() {
146 unpack ${A}
147 cd ${S}
148
149 # add Gentoo-specific layout
150 cat ${FILESDIR}/config.layout-gentoo >> config.layout
151 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
152 s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
153
154 # don't need to check dev dependencies
155 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
156 }
157
158 src_compile() {
159
160 local web="apache"
161 useq lighttpd && web="lighttpd"
162
163 local dbtype=""
164 local dba=""
165
166 if useq mysql; then
167 dbtype="--with-db-type=mysql"
168 dba="--with-db-dba=root"
169 fi
170 if useq postgres;then
171 dbtype="--with-db-type=Pg"
172 dba="--with-db-dba=postgres"
173 fi
174 if useq postgres && useq mysql; then
175 ewarn "Both mysql and postgres USE flags enabled, default is mysql."
176 ewarn "You can set the default value in RT_SiteConfig before DB init."
177 dbtype="--with-db-type=mysql"
178 dba="--with-db-dba=root"
179 fi
180
181 ./configure --enable-layout=Gentoo \
182 --with-bin-owner=rt \
183 --with-libs-owner=rt \
184 --with-libs-group=rt \
185 --with-rt-group=rt \
186 --with-web-user=${web} \
187 --with-web-group=${web} \
188 ${dbtype} ${dba}
189
190 # check for missing deps and ask to report if something is broken
191 local myconf="--verbose $(use_with mysql) \
192 $(use_with postgres pg) \
193 $(use_with fastcgi) \
194 $(use_with lighttpd fastcgi)"
195 if ! useq fastcgi && ! useq lighttpd ; then
196 myconf="${myconf} --with-modperl2"
197 fi
198
199 /usr/bin/perl ./sbin/rt-test-dependencies ${myconf} > ${T}/t
200 if grep -q "MISSING" ${T}/t; then
201 ewarn "Missing Perl dependency!"
202 ewarn
203 cat ${T}/t
204 ewarn
205 ewarn "Please file a bug in the Gentoo Bugzilla with the information above"
206 ewarn "and assign it to rl03@gentoo.org"
207 die "Missing dependencies."
208 fi
209 }
210
211 src_install() {
212 webapp_src_preinst
213
214 make install
215
216 # make sure we don't clobber existing site configuration
217 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
218
219 # copy upgrade files
220 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
221
222 cd ${D}
223 grep -Rl "${D}" * | xargs dosed
224
225 if useq lighttpd; then
226 newinitd ${FILESDIR}/${PN}.init.d ${PN}
227 newconfd ${FILESDIR}/${PN}.conf.d ${PN}
228 else
229 local CONF="rt_apache2_fcgi.conf rt_apache2.conf"
230 cd ${FILESDIR} && cp ${CONF} ${D}/${MY_HOSTROOTDIR}/${PF}/etc
231 fi
232 webapp_postinst_txt en ${FILESDIR}/${PV}/postinstall-en.txt
233 webapp_hook_script ${FILESDIR}/${PV}/reconfig
234 webapp_src_install
235 }

  ViewVC Help
Powered by ViewVC 1.1.20