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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jan 26 21:10:33 2006 UTC (14 years ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +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.4.ebuild,v 1.1 2005/12/04 16:19:15 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="~ppc ~x86"
14
15 DEPEND="
16 >=dev-lang/perl-5.8.3
17 >=dev-perl/Params-Validate-0.02
18 dev-perl/Cache-Cache
19 >=dev-perl/Exception-Class-1.14
20 >=perl-core/Digest-MD5-2.27
21 >=perl-core/Storable-2.08
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.09
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 >=perl-core/File-Spec-0.8
41 >=dev-perl/log-dispatch-2.0
42 >=dev-perl/locale-maketext-lexicon-0.32
43 dev-perl/locale-maketext-fuzzy
44 >=dev-perl/MIME-tools-5.417
45 >=dev-perl/MailTools-1.60
46 dev-perl/text-wrapper
47 dev-perl/Text-WikiFormat
48 dev-perl/Time-modules
49 dev-perl/TermReadKey
50 >=dev-perl/Text-Quoted-1.3
51 >=dev-perl/Tree-Simple-1.04
52 dev-perl/Module-Versions-Report
53 dev-perl/Cache-Simple-TimedExpiry
54 dev-perl/XML-Simple
55 dev-perl/regexp-common
56 dev-perl/WWW-Mechanize
57 dev-perl/Test-WWW-Mechanize
58 dev-perl/Module-Refresh
59
60 dev-perl/Font-AFM
61 dev-perl/text-autoformat
62 dev-perl/text-reform
63 "
64
65 RDEPEND="
66 ${DEPEND}
67 virtual/mta
68 mysql? ( >=dev-db/mysql-4.0.13 >=dev-perl/DBD-mysql-2.1018 )
69 postgres? ( >=dev-db/postgresql-7.4.2-r1 >=dev-perl/DBD-Pg-1.41 )
70 !lighttpd? (
71 >=dev-perl/Apache-DBI-0.92
72 apache2? ( >=net-www/apache-2
73 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
74 !fastcgi? ( >=www-apache/libapreq2-2.06
75 >=dev-perl/HTML-Mason-1.31 ) )
76 !apache2? ( =net-www/apache-1*
77 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
78 !fastcgi? ( =www-apache/libapreq-1* ) ) )
79 lighttpd? (
80 >=www-servers/lighttpd-1.3.13
81 dev-perl/FCGI )
82 "
83
84 LICENSE="GPL-2"
85
86 add_user_rt() {
87 # add new user
88 # suexec2 requires uid >= 1000; enewuser is of no help here
89 # From: Mike Frysinger <vapier@gentoo.org>
90 # Date: Fri, 17 Jun 2005 08:41:44 -0400
91 # i'd pick a 5 digit # if i were you
92
93 local euser="rt"
94
95 # first check if username rt exists
96 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
97 # check uid
98 rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
99 if $(expr ${rt_uid} '<' 1000 > /dev/null); then
100 ewarn "uid of user rt is less than 1000. suexec2 will not work."
101 ewarn "If you want to use FastCGI, please delete the user 'rt'"
102 ewarn "from your system and re-emerge www-apps/rt"
103 epause
104 fi
105 return 0 # all is well
106 fi
107
108 # add user
109 # stolen from enewuser
110 local pwrange euid
111
112 pwrange=$(seq 10001 11001)
113 for euid in ${pwrange} ; do
114 [[ -z $(egetent passwd ${euid}) ]] && break
115 done
116 if [[ ${euid} == "11001" ]]; then
117 # she gets around, doesn't she?
118 die "No available uid's found"
119 fi
120
121 einfo " - Userid: ${euid}"
122
123 enewuser rt ${euid} -1 /dev/null rt > /dev/null
124 return 0
125 }
126
127 pkg_setup() {
128 webapp_pkg_setup
129
130 if useq mysql; then
131 ewarn "RT needs MySQL with innodb support"
132 fi
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}/3.4.2/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 if useq lighttpd; then
162 web="lighttpd"
163 fi
164
165 ./configure --enable-layout=Gentoo \
166 --with-bin-owner=rt \
167 --with-libs-owner=rt \
168 --with-libs-group=rt \
169 --with-rt-group=rt \
170 --with-web-user=${web} \
171 --with-web-group=${web}
172
173 # check for missing deps and ask to report if something is broken
174 local myconf="--verbose $(use_with mysql) \
175 $(use_with postgres pg) \
176 $(use_with fastcgi) \
177 $(use_with lighttpd fastcgi)"
178 if ! useq fastcgi && ! useq lighttpd; then
179 myconf="${myconf} $(use_with apache2 modperl2)"
180 ! useq apache2 && myconf="${myconf} --with-modperl1"
181 fi
182
183 /usr/bin/perl ./sbin/rt-test-dependencies ${myconf} > ${T}/t
184 if grep -q "MISSING" ${T}/t; then
185 ewarn "Missing Perl dependency!"
186 ewarn
187 cat ${T}/t
188 ewarn
189 ewarn "Please file a bug in the Gentoo Bugzilla with the information above"
190 ewarn "and assign it to rl03@gentoo.org"
191 die "Missing dependencies."
192 fi
193 }
194
195 src_install() {
196 webapp_src_preinst
197
198 make install
199
200 # make sure we don't clobber existing site configuration
201 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
202
203 # copy upgrade files
204 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
205
206 cd ${D}
207 grep -Rl "${D}" * | xargs dosed
208
209 if useq lighttpd; then
210 newinitd ${FILESDIR}/3.4.2/${PN}.init.d ${PN}
211 insinto /etc/conf.d
212 newins ${FILESDIR}/3.4.2/${PN}.conf.d ${PN}
213 else
214 if useq apache2; then
215 local CONF="rt_apache2_fcgi.conf rt_apache2.conf"
216 else
217 local CONF="rt_apache1_fcgi.conf rt_apache.conf"
218 fi
219 cd ${FILESDIR}/3.4.2
220 cp ${CONF} ${D}/${MY_HOSTROOTDIR}/${PF}/etc
221 fi
222 webapp_postinst_txt en ${FILESDIR}/3.4.2/postinstall-en.txt
223 webapp_hook_script ${FILESDIR}/3.4.4/reconfig
224 webapp_src_install
225 }

  ViewVC Help
Powered by ViewVC 1.1.20