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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Thu Jan 26 21:10:33 2006 UTC (14 years, 2 months ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Cleanup in FILESDIR
(Portage version: 2.1_pre3-r1)

1 # Copyright 1999-2005 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.3.ebuild,v 1.8 2005/11/20 16:50:38 stuart Exp $
4
5 inherit webapp eutils
6
7 IUSE="mysql postgres fastcgi apache2 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 ftp://ftp.eu.uu.net/pub/unix/ticketing/${PN}/release/${P}.tar.gz
13 ftp://rhinst.ece.cmu.edu/${PN}/release/${P}.tar.gz"
14
15 KEYWORDS="~ppc ~x86"
16
17 DEPEND="
18 >=dev-lang/perl-5.8.3
19 >=dev-perl/Params-Validate-0.02
20 dev-perl/Cache-Cache
21 >=dev-perl/Exception-Class-1.14
22 perl-core/CGI
23 >dev-perl/HTML-Mason-1.28
24 dev-perl/MLDBM
25 dev-perl/FreezeThaw
26 >=dev-perl/Apache-Session-1.53
27 >=dev-perl/XML-RSS-1.05
28 >=dev-perl/HTTP-Server-Simple-0.07
29 >=dev-perl/HTTP-Server-Simple-Mason-0.05
30 dev-perl/HTML-Tree
31 dev-perl/HTML-Format
32 dev-perl/libwww-perl
33 >=dev-perl/DBI-1.37
34 dev-perl/Test-Inline
35 >=dev-perl/class-returnvalue-0.40
36 >=dev-perl/dbix-searchbuilder-1.27
37 dev-perl/text-template
38 dev-perl/HTML-Parser
39 >=dev-perl/HTML-Scrubber-0.08
40 >=dev-perl/log-dispatch-2.0
41 >=dev-perl/locale-maketext-lexicon-0.32
42 dev-perl/locale-maketext-fuzzy
43 >=dev-perl/MIME-tools-5.417
44 >=dev-perl/MailTools-1.60
45 dev-perl/text-wrapper
46 dev-perl/Text-WikiFormat
47 dev-perl/Time-modules
48 dev-perl/TermReadKey
49 >=dev-perl/Text-Quoted-1.3
50 >=dev-perl/Tree-Simple-1.04
51 dev-perl/Module-Versions-Report
52 dev-perl/Cache-Simple-TimedExpiry
53 dev-perl/XML-Simple
54 dev-perl/regexp-common
55 dev-perl/WWW-Mechanize
56 dev-perl/Test-WWW-Mechanize
57 dev-perl/Module-Refresh
58
59 dev-perl/Font-AFM
60 dev-perl/text-autoformat
61 dev-perl/text-reform
62 "
63
64 RDEPEND="
65 ${DEPEND}
66 virtual/mta
67 mysql? ( >=dev-db/mysql-4.0.13 >=dev-perl/DBD-mysql-2.1018 )
68 postgres? ( >=dev-db/postgresql-7.4.2-r1 >=dev-perl/DBD-Pg-1.41 )
69 !lighttpd? (
70 >=dev-perl/Apache-DBI-0.92
71 apache2? ( >=net-www/apache-2
72 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
73 !fastcgi? ( >=www-apache/libapreq2-2.06 ) )
74 !apache2? ( =net-www/apache-1*
75 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
76 !fastcgi? ( =www-apache/libapreq-1* ) ) )
77 lighttpd? (
78 >=www-servers/lighttpd-1.3.13
79 dev-perl/FCGI )
80 "
81
82 LICENSE="GPL-2"
83
84 add_user_rt() {
85 # add new user
86 # suexec2 requires uid >= 1000; enewuser is of no help here
87 # From: Mike Frysinger <vapier@gentoo.org>
88 # Date: Fri, 17 Jun 2005 08:41:44 -0400
89 # i'd pick a 5 digit # if i were you
90
91 local euser="rt"
92
93 # first check if username rt exists
94 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
95 # check uid
96 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
97 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
98 ewarn "uid of user rt is less than 1000. suexec2 will not work."
99 ewarn "If you want to use FastCGI, please delete the user 'rt'"
100 ewarn "from your system and re-emerge www-apps/rt"
101 epause
102 fi
103 return 0 # all is well
104 fi
105
106 # add user
107 # stolen from enewuser
108 local pwrange euid
109
110 pwrange=$(seq 10001 11001)
111 for euid in ${pwrange} ; do
112 [[ -z $(egetent passwd ${euid}) ]] && break
113 done
114 if [[ ${euid} == "11001" ]]; then
115 # she gets around, doesn't she?
116 die "No available uid's found"
117 fi
118
119 einfo " - Userid: ${euid}"
120
121 enewuser rt ${euid} -1 /dev/null rt > /dev/null
122 return 0
123 }
124
125 pkg_setup() {
126 webapp_pkg_setup
127
128 if useq mysql; then
129 ewarn "RT needs MySQL with innodb support"
130 fi
131 ewarn
132 ewarn "If you are upgrading from an existing _RT2_ installation,"
133 ewarn "stop this ebuild (Ctrl-C now), download the upgrade tool,"
134 ewarn "http://bestpractical.com/pub/rt/devel/rt2-to-rt3.tar.gz"
135 ewarn "and follow the included instructions."
136 ewarn
137 enewgroup rt >/dev/null
138 add_user_rt || die "Could not add user"
139
140 }
141
142 src_unpack() {
143 unpack ${A}
144 cd ${S}
145 epatch ${FILESDIR}/3.4.2/Callback.patch # fix for bug #109745
146
147 # add Gentoo-specific layout
148 cat ${FILESDIR}/3.4.2/config.layout-gentoo >> config.layout
149 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
150 s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
151
152 # don't need to check dev dependencies
153 sed -e "s|\$args{'with-DEV'} =1;|#\$args{'with-DEV'} =1;|" -i sbin/rt-test-dependencies.in || die
154 }
155
156 src_compile() {
157
158 local web="apache"
159 if useq lighttpd; then
160 web="lighttpd"
161 fi
162
163 ./configure --enable-layout=Gentoo \
164 --with-bin-owner=rt \
165 --with-libs-owner=rt \
166 --with-libs-group=rt \
167 --with-rt-group=rt \
168 --with-web-user=${web} \
169 --with-web-group=${web}
170
171 # check for missing deps and ask to report if something is broken
172 local myconf="--verbose $(use_with mysql) \
173 $(use_with postgres pg) \
174 $(use_with fastcgi) \
175 $(use_with lighttpd fastcgi)"
176 if ! useq fastcgi && ! useq lighttpd; then
177 myconf="${myconf} $(use_with apache2 modperl2)"
178 ! useq apache2 && myconf="${myconf} --with-modperl1"
179 fi
180
181 /usr/bin/perl ./sbin/rt-test-dependencies ${myconf} > ${T}/t
182 if grep -q "MISSING" ${T}/t; then
183 ewarn "Missing Perl dependency!"
184 ewarn
185 cat ${T}/t
186 ewarn
187 ewarn "Please file a bug in the Gentoo Bugzilla with the information above"
188 ewarn "and assign it to rl03@gentoo.org"
189 die "Missing dependencies."
190 fi
191 }
192
193 src_install() {
194 webapp_src_preinst
195
196 make install
197
198 # make sure we don't clobber existing site configuration
199 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
200
201 # copy upgrade files
202 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
203
204 cd ${D}
205 grep -Rl "${D}" * | xargs dosed
206
207 if useq lighttpd; then
208 newinitd ${FILESDIR}/3.4.2/${PN}.init.d ${PN}
209 insinto /etc/conf.d
210 newins ${FILESDIR}/3.4.2/${PN}.conf.d ${PN}
211 else
212 if useq apache2; then
213 webapp_server_configfile apache2 ${FILESDIR}/3.4.2/rt_apache2_fcgi.conf
214 else
215 webapp_server_configfile apache1 ${FILESDIR}/3.4.2/rt_apache.conf
216 webapp_server_configfile apache1 ${FILESDIR}/3.4.2/rt_apache1_fcgi.conf
217 fi
218 fi
219 webapp_postinst_txt en ${FILESDIR}/3.4.2/postinstall-en.txt
220 webapp_hook_script ${FILESDIR}/3.4.2/reconfig
221 webapp_src_install
222 }

  ViewVC Help
Powered by ViewVC 1.1.20