/[gentoo-x86]/www-apps/otrs/otrs-3.0.10.ebuild
Gentoo

Contents of /www-apps/otrs/otrs-3.0.10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Apr 4 08:16:02 2012 UTC (2 years, 4 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Bump

(Portage version: 2.2.0_alpha98/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/otrs/otrs-3.0.10.ebuild,v 1.2 2011/11/02 21:52:16 vapier Exp $
4
5 EAPI=2
6
7 inherit eutils confutils
8
9 DESCRIPTION="OTRS is an Open source Ticket Request System"
10 HOMEPAGE="http://otrs.org/"
11 SRC_URI="http://ftp.otrs.org/pub/${PN}/${P}.tar.bz2"
12
13 LICENSE="AGPL-3"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="apache2 fastcgi +gd ldap mod_perl +mysql pdf postgres soap"
16 SLOT="0"
17 #WEBAPP_MANUAL_SLOT="yes"
18
19 # FIXME add oracle/mssql/DB2 DB support
20 # FIXME #cjk? ( >=dev-perl/Encode-HanExtra-0.23 ) unsatisfied dep
21
22 DEPEND=""
23 RDEPEND="${DEPEND}
24 dev-perl/Authen-SASL
25 dev-perl/Crypt-PasswdMD5
26 dev-perl/CSS-Minifier
27 dev-perl/Date-Pcalc
28 mysql? ( dev-perl/DBD-mysql )
29 postgres? ( dev-perl/DBD-Pg )
30 dev-perl/DBI
31 gd? ( dev-perl/GD
32 dev-perl/GDTextUtil
33 dev-perl/GDGraph )
34 dev-perl/IO-Socket-SSL
35 >=dev-perl/JavaScript-Minifier-1.05
36 >=dev-perl/JSON-2.21
37 dev-perl/JSON-XS
38 dev-perl/LWP-UserAgent-Determined
39 dev-perl/Mail-POP3Client
40 dev-perl/MailTools
41 >=dev-perl/MIME-tools-5.427
42 dev-perl/NetxAP
43 dev-perl/Net-IMAP-Simple-SSL
44 >dev-perl/Net-DNS-0.60
45 dev-perl/Net-SMTP-SSL
46 dev-perl/Net-SMTP-TLS
47 dev-perl/IO-stringy
48 pdf? ( >=dev-perl/PDF-API2-0.73
49 virtual/perl-Compress-Raw-Zlib )
50 ldap? ( dev-perl/perl-ldap )
51 soap? (
52 dev-perl/SOAP-Lite
53 !=dev-perl/SOAP-Lite-0.711
54 !=dev-perl/SOAP-Lite-0.712 )
55 dev-perl/Text-CSV
56 dev-perl/Text-CSV_XS
57 dev-perl/TimeDate
58 dev-perl/XML-Parser
59
60 virtual/perl-MIME-Base64
61 >=virtual/perl-CGI-3.33
62 virtual/perl-libnet
63 virtual/perl-Digest-MD5
64 >=virtual/perl-Digest-SHA-5.48
65
66 virtual/mta
67
68 apache2? ( mod_perl? ( www-servers/apache:2
69 =www-apache/libapreq2-2* www-apache/mod_perl )
70 fastcgi? ( || ( www-apache/mod_fcgid www-apache/mod_fastcgi )
71 www-servers/apache:2[suexec] )
72 !fastcgi? (
73 !mod_perl? ( www-servers/apache:2[suexec] ) )
74 )
75 fastcgi? ( dev-perl/FCGI virtual/httpd-fastcgi )
76 !fastcgi? (
77 !apache2? ( virtual/httpd-cgi ) )"
78
79 # dev-perl/libwww-perl
80
81 OTRS_HOME="/var/lib/otrs"
82
83 pkg_setup() {
84 enewuser otrs -1 -1 ${OTRS_HOME} apache
85 confutils_require_any mysql postgres
86 }
87
88 src_prepare() {
89 rm -fr "${S}/scripts"/{auto_*,redhat*,suse*,*.spec} || die
90 cp Kernel/Config.pm{.dist,} || die
91 # procmail/fetchmail/mailfilter
92 # local mailrc=".fetchmailrc .mailfilter .procmailrc"
93 # for i in ${mailrc}; do
94 # mv ${i}{.dist,} || die
95 # done
96 # fperms 600 ${mailrc} || die
97 # fowners otrs ${mailrc} || die
98
99 sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \
100 || die "sed failed"
101
102 grep -lR "/opt" "${S}"/scripts | \
103 xargs sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" \
104 || die "sed failed"
105
106 cd Kernel/Config/ || die
107 for i in *.dist; do
108 cp ${i} $(basename ${i} .dist) || die
109 done
110
111 perl "${S}"/bin/otrs.SetPermissions.pl \
112 --otrs-user=otrs \
113 --web-user=apache \
114 --otrs-group=apache \
115 --web-group=apache "${S}" \
116 || die "Could not set permissions"
117
118 echo "CONFIG_PROTECT=\"${OTRS_HOME}/Kernel/Config.pm \
119 ${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}"
120
121 }
122
123 src_install() {
124 dodoc CHANGES CREDITS INSTALL README* TODO UPGRADING \
125 doc/otrs-database.dia doc/X-OTRS-Headers.txt || die
126
127 dodoc doc/manual/en/otrs_admin_book.pdf
128
129 insinto "${OTRS_HOME}"
130 doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \
131 Custom Kernel bin scripts var || die "doins failed"
132
133 cat "${S}"/var/cron/*.dist > crontab
134 insinto /usr/share/doc/${PF}/
135 doins crontab
136
137 for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable; do
138 keepdir "${OTRS_HOME}/var/${a}"
139 done
140 doenvd "${T}/50${PN}" || die
141 }
142
143 # This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred
144 pkg_config() {
145 einfo "Installing cronjobs"
146 crontab -u otrs /usr/share/doc/${PF}/crontab
147 }
148
149 pkg_postinst() {
150 elog "Enable cronjobs with the following command:"
151 elog "crontab -u otrs crontab"
152 }

  ViewVC Help
Powered by ViewVC 1.1.20