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

Contents of /www-apps/rt/rt-3.4.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Aug 8 22:37:13 2005 UTC (14 years, 9 months ago) by rl03
Branch: MAIN
Changes since 1.4: +12 -11 lines
Fixed libapreq2/mod_perl2 dependency wrt bug #67686, bug #61893, bug #73115.
(Portage version: 2.0.51.22-r2)

1 rl03 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 rl03 1.5 # $Header: /var/cvsroot/gentoo-x86/www-apps/rt/rt-3.4.2-r1.ebuild,v 1.4 2005/08/04 16:44:40 swegener 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     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 rl03 1.2 KEYWORDS="~x86 ~ppc"
16 rl03 1.1
17     DEPEND="
18 rl03 1.2 >=net-www/webapp-config-1.11-r1
19 rl03 1.1 >=dev-lang/perl-5.8.3
20     >=dev-perl/Params-Validate-0.02
21     dev-perl/Cache-Cache
22     >=dev-perl/Exception-Class-1.14
23     perl-core/CGI
24     >=dev-perl/HTML-Mason-1.28
25     dev-perl/MLDBM
26     dev-perl/FreezeThaw
27     >=dev-perl/Apache-Session-1.53
28     dev-perl/XML-RSS
29     >=dev-perl/HTTP-Server-Simple-0.07
30     >=dev-perl/HTTP-Server-Simple-Mason-0.05
31     dev-perl/HTML-Tree
32     dev-perl/HTML-Format
33     dev-perl/libwww-perl
34     >=dev-perl/DBI-1.37
35     dev-perl/Test-Inline
36     >=dev-perl/class-returnvalue-0.40
37     >=dev-perl/dbix-searchbuilder-1.27
38     dev-perl/text-template
39     dev-perl/HTML-Parser
40     >=dev-perl/HTML-Scrubber-0.08
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/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 rl03 1.5 apache2? ( >=net-www/apache-2
72     fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
73     !fastcgi? ( >=www-apache/libapreq2-2.06 ) )
74 rl03 1.1 !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} /bin/false /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    
146     # add Gentoo-specific layout
147     cat ${FILESDIR}/${PV}/config.layout-gentoo >> config.layout
148 rl03 1.2 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
149     s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
150 rl03 1.1 }
151    
152     src_compile() {
153    
154     local web="apache"
155     if useq lighttpd; then
156     web="lighttpd"
157     fi
158    
159     ./configure --enable-layout=Gentoo \
160     --with-bin-owner=rt \
161     --with-libs-owner=rt \
162     --with-libs-group=rt \
163     --with-rt-group=rt \
164     --with-web-user=${web} \
165     --with-web-group=${web}
166    
167     # check for missing deps and ask to report if something is broken
168     if `make testdeps | grep "MISSING"`; then
169     ewarn "Missing Perl dependency!"
170     ewarn "Please file a bug in the Gentoo Bugzilla with the information above"
171     ewarn "and assign it to rl03@gentoo.org"
172     die "Missing dependencies."
173     fi
174     }
175    
176     src_install() {
177     webapp_src_preinst
178    
179     make install
180    
181     # make sure we don't clobber existing site configuration
182 rl03 1.2 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
183 rl03 1.1
184     # copy upgrade files
185 rl03 1.2 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
186 rl03 1.1
187     cd ${D}
188     grep -Rl "${D}" * | xargs dosed
189    
190 rl03 1.5 if useq lighttpd; then
191     newinitd ${FILESDIR}/${PV}/${PN}.init.d ${PN}
192     insinto /etc/conf.d
193     newins ${FILESDIR}/${PV}/${PN}.conf.d ${PN}
194     else
195     if useq apache2; then
196     webapp_server_configfile apache2 ${FILESDIR}/${PV}/rt_apache2_fcgi.conf
197     else
198 rl03 1.1 webapp_server_configfile apache1 ${FILESDIR}/${PV}/rt_apache.conf
199     webapp_server_configfile apache1 ${FILESDIR}/${PV}/rt_apache1_fcgi.conf
200     fi
201     fi
202     webapp_postinst_txt en ${FILESDIR}/${PV}/postinstall-en.txt
203     webapp_hook_script ${FILESDIR}/${PV}/reconfig
204     webapp_src_install
205     }

  ViewVC Help
Powered by ViewVC 1.1.20