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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jan 11 04:05:55 2013 UTC (5 years, 10 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump

(Portage version: 2.2.0_alpha150/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 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.1.10.ebuild,v 1.1 2012/09/03 10:56:20 patrick 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 # The enewuser otrs will fail if apache isn't there, but it's an optional dep
85 # so we create the apache user here just in case
86 enewgroup apache 81
87 enewuser apache 81 -1 /var/www apache
88 enewuser otrs -1 -1 ${OTRS_HOME} apache
89 confutils_require_any mysql postgres
90 }
91
92 src_prepare() {
93 rm -fr "${S}/scripts"/{auto_*,redhat*,suse*,*.spec} || die
94 cp Kernel/Config.pm{.dist,} || die
95 # procmail/fetchmail/mailfilter
96 # local mailrc=".fetchmailrc .mailfilter .procmailrc"
97 # for i in ${mailrc}; do
98 # mv ${i}{.dist,} || die
99 # done
100 # fperms 600 ${mailrc} || die
101 # fowners otrs ${mailrc} || die
102
103 sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" "${S}"/Kernel/Config.pm \
104 || die "sed failed"
105
106 grep -lR "/opt" "${S}"/scripts | \
107 xargs sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" \
108 || die "sed failed"
109
110 cd Kernel/Config/ || die
111 for i in *.dist; do
112 cp ${i} $(basename ${i} .dist) || die
113 done
114
115 perl "${S}"/bin/otrs.SetPermissions.pl \
116 --otrs-user=otrs \
117 --web-user=apache \
118 --otrs-group=apache \
119 --web-group=apache "${S}" \
120 || die "Could not set permissions"
121
122 echo "CONFIG_PROTECT=\"${OTRS_HOME}/Kernel/Config.pm \
123 ${OTRS_HOME}/Kernel/Config/GenericAgent.pm\"" > "${T}/50${PN}"
124
125 }
126
127 src_install() {
128 dodoc CHANGES CREDITS INSTALL README* UPGRADING \
129 doc/X-OTRS-Headers.txt || die
130
131 dodoc doc/manual/en/otrs_admin_book.pdf
132
133 insinto "${OTRS_HOME}"
134 doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE \
135 Custom Kernel bin scripts var || die "doins failed"
136
137 cat "${S}"/var/cron/*.dist > crontab
138 insinto /usr/share/doc/${PF}/
139 doins crontab
140
141 for a in article log pics/images pics/stats pics sessions spool tmp tmp/CacheFileStorable; do
142 keepdir "${OTRS_HOME}/var/${a}"
143 done
144 doenvd "${T}/50${PN}" || die
145 }
146
147 # This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred
148 pkg_config() {
149 einfo "Installing cronjobs"
150 crontab -u otrs /usr/share/doc/${PF}/crontab
151 }
152
153 pkg_postinst() {
154 elog "Enable cronjobs with the following command:"
155 elog "crontab -u otrs crontab"
156 }

  ViewVC Help
Powered by ViewVC 1.1.20