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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Mon Aug 28 01:55:51 2006 UTC (13 years, 7 months ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump
(Portage version: 2.1.1_pre2-r6)
 (Signed Manifest commit)

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

  ViewVC Help
Powered by ViewVC 1.1.20