/[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.2 - (hide annotations) (download)
Fri Jul 29 18:21:25 2005 UTC (14 years, 10 months ago) by rl03
Branch: MAIN
Changes since 1.1: +7 -6 lines
Fixed variables in reconfig hook. Closes #99853.
(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.2 # $Header: /var/cvsroot/gentoo-x86/www-apps/rt/rt-3.4.2-r1.ebuild,v 1.1 2005/06/21 02:12:38 rl03 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-Test
71     >=dev-perl/Apache-DBI-0.92
72     apache2? ( >=net-www/apache-2 dev-perl/FCGI net-www/mod_fastcgi )
73     !apache2? ( =net-www/apache-1*
74     fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
75     !fastcgi? ( =www-apache/libapreq-1* ) ) )
76     lighttpd? (
77     >=www-servers/lighttpd-1.3.13
78     dev-perl/FCGI )
79     "
80    
81     LICENSE="GPL-2"
82    
83     add_user_rt() {
84     # add new user
85     # suexec2 requires uid >= 1000; enewuser is of no help here
86     # From: Mike Frysinger <vapier@gentoo.org>
87     # Date: Fri, 17 Jun 2005 08:41:44 -0400
88     # i'd pick a 5 digit # if i were you
89    
90     local euser="rt"
91    
92     # first check if username rt exists
93     if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
94     # check uid
95     rt_uid=$(egetent passwd "${euser}" | cut -d: -f3)
96     if `expr ${rt_uid} '<' 1000 > /dev/null`; then
97     ewarn "uid of user rt is less than 1000. suexec2 will not work."
98     ewarn "If you want to use FastCGI, please delete the user 'rt'"
99     ewarn "from your system and re-emerge www-apps/rt"
100     epause
101     fi
102     return 0 # all is well
103     fi
104    
105     # add user
106     # stolen from enewuser
107     local pwrange euid
108    
109     pwrange=$(seq 10001 11001)
110     for euid in ${pwrange} ; do
111     [[ -z $(egetent passwd ${euid}) ]] && break
112     done
113     if [[ ${euid} == "11001" ]]; then
114     # she gets around, doesn't she?
115     die "No available uid's found"
116     fi
117    
118     einfo " - Userid: ${euid}"
119    
120     enewuser rt ${euid} /bin/false /dev/null rt > /dev/null
121     return 0
122     }
123    
124     pkg_setup() {
125     webapp_pkg_setup
126    
127     if useq mysql; then
128     ewarn "RT needs MySQL with innodb support"
129     fi
130     ewarn
131     ewarn "If you are upgrading from an existing _RT2_ installation,"
132     ewarn "stop this ebuild (Ctrl-C now), download the upgrade tool,"
133     ewarn "http://bestpractical.com/pub/rt/devel/rt2-to-rt3.tar.gz"
134     ewarn "and follow the included instructions."
135     ewarn
136     enewgroup rt >/dev/null
137     add_user_rt || die "Could not add user"
138    
139     }
140    
141     src_unpack() {
142     unpack ${A}
143     cd ${S}
144    
145     # add Gentoo-specific layout
146     cat ${FILESDIR}/${PV}/config.layout-gentoo >> config.layout
147 rl03 1.2 sed -e "s|PREFIX|${D}/${MY_HOSTROOTDIR}/${PF}|
148     s|HTMLDIR|${D}/${MY_HTDOCSDIR}|g" -i ./config.layout || die
149 rl03 1.1 }
150    
151     src_compile() {
152    
153     local web="apache"
154     if useq lighttpd; then
155     web="lighttpd"
156     fi
157    
158     ./configure --enable-layout=Gentoo \
159     --with-bin-owner=rt \
160     --with-libs-owner=rt \
161     --with-libs-group=rt \
162     --with-rt-group=rt \
163     --with-web-user=${web} \
164     --with-web-group=${web}
165    
166     # check for missing deps and ask to report if something is broken
167     if `make testdeps | grep "MISSING"`; then
168     ewarn "Missing Perl dependency!"
169     ewarn "Please file a bug in the Gentoo Bugzilla with the information above"
170     ewarn "and assign it to rl03@gentoo.org"
171     die "Missing dependencies."
172     fi
173     }
174    
175     src_install() {
176     webapp_src_preinst
177    
178     make install
179    
180     # make sure we don't clobber existing site configuration
181 rl03 1.2 rm -f ${D}/${MY_HOSTROOTDIR}/${PF}/etc/RT_SiteConfig.pm
182 rl03 1.1
183     # copy upgrade files
184 rl03 1.2 cp -R etc/upgrade ${D}/${MY_HOSTROOTDIR}/${PF}
185 rl03 1.1
186     cd ${D}
187     grep -Rl "${D}" * | xargs dosed
188    
189     if ! useq lighttpd; then
190     if ! useq apache2; then
191     webapp_server_configfile apache1 ${FILESDIR}/${PV}/rt_apache.conf
192     webapp_server_configfile apache1 ${FILESDIR}/${PV}/rt_apache1_fcgi.conf
193     else
194     webapp_server_configfile apache2 ${FILESDIR}/${PV}/rt_apache2_fcgi.conf
195     fi
196     else
197     newinitd ${FILESDIR}/${PV}/${PN}.init.d ${PN}
198     insinto /etc/conf.d
199     newins ${FILESDIR}/${PV}/${PN}.conf.d ${PN}
200     fi
201     webapp_postinst_txt en ${FILESDIR}/${PV}/postinstall-en.txt
202     webapp_hook_script ${FILESDIR}/${PV}/reconfig
203     webapp_src_install
204     }

  ViewVC Help
Powered by ViewVC 1.1.20