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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Dec 22 16:30:48 2006 UTC (13 years, 5 months ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Error occurred while calculating annotation data.
FILE REMOVED
Version bump
(Portage version: 2.1.2_rc1-r5)
 (Signed Manifest commit)

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

  ViewVC Help
Powered by ViewVC 1.1.20