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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 19 15:20:07 2011 UTC (7 years, 3 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.2.0_alpha51/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-2.3.3.ebuild,v 1.3 2011/08/19 14:19:37 xarthisius Exp $
4
5 inherit webapp eutils depend.apache
6
7 DESCRIPTION="OTRS is an Open source Ticket Request System"
8 HOMEPAGE="http://otrs.org/"
9 SRC_URI="ftp://ftp.otrs.org/pub/${PN}/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 KEYWORDS="~amd64 ~x86"
13 IUSE="mysql postgres fastcgi ldap gd pdf"
14
15 RDEPEND="${DEPEND}
16 virtual/mta
17 =dev-lang/perl-5*
18
19 dev-perl/Authen-SASL
20 dev-perl/Crypt-PasswdMD5
21 dev-perl/DBI
22 dev-perl/Date-Pcalc
23 dev-perl/IO-stringy
24 dev-perl/MIME-tools
25 dev-perl/MailTools
26 dev-perl/Net-DNS
27 dev-perl/TimeDate
28 dev-perl/XML-Parser
29 dev-perl/libwww-perl
30 virtual/perl-CGI
31 virtual/perl-Digest-MD5
32 virtual/perl-MIME-Base64
33 virtual/perl-libnet
34
35 apache2? ( =www-apache/libapreq2-2* )
36 fastcgi? ( dev-perl/FCGI )
37 gd? ( dev-perl/GD dev-perl/GDTextUtil dev-perl/GDGraph )
38 ldap? ( dev-perl/perl-ldap net-nds/openldap )
39 mysql? ( >=dev-perl/DBD-mysql-3.0005 )
40 pdf? ( dev-perl/PDF-API2 )
41 postgres? ( dev-perl/DBD-Pg )
42 "
43
44 want_apache
45
46 pkg_setup() {
47 depend.apache_pkg_setup
48 webapp_pkg_setup
49 if use apache2; then
50 enewuser otrs -1 -1 /dev/null apache
51 fi
52 }
53
54 src_unpack() {
55 unpack ${A}
56 cp "${S}"/Kernel/Config.pm{.dist,}
57
58 cd "${S}"/Kernel/Config/
59 for i in *.dist; do
60 cp ${i} $(basename ${i} .dist)
61 done
62
63 cd "${S}"/scripts
64 rm -rf auto_* redhat* suse*
65
66 if use fastcgi; then
67 epatch "${FILESDIR}"/apache2.patch
68 sed -e "s|cgi-bin|fcgi-bin|" -i "${S}"/scripts/apache2-httpd.include.conf
69 sed -e "s|index.pl|index.fpl|" -i "${S}"/var/httpd/htdocs/index.html
70 fi
71 }
72
73 src_install() {
74 webapp_src_preinst
75 dodir "${MY_HOSTROOTDIR}"/${PF}
76
77 dodoc CHANGES CREDITS INSTALL README* TODO UPGRADING \
78 doc/otrs-database.dia doc/test-* doc/X-OTRS-Headers.txt \
79 .fetchmailrc.dist .mailfilter.dist .procmailrc.dist
80 dohtml doc/manual/{en,de}/html/*
81
82 insinto "${MY_HOSTROOTDIR}"/${PF}
83 doins -r .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE Kernel bin scripts var
84
85 mv "${D}/${MY_HOSTROOTDIR}"/${PF}/var/httpd/htdocs/* "${D}/${MY_HTDOCSDIR}"
86 rm -rf "${D}/${MY_HOSTROOTDIR}"/${PF}/var/httpd
87
88 local a d="article log pics/images pics/stats pics sessions spool tmp"
89 for a in ${d}; do
90 keepdir "${MY_HOSTROOTDIR}"/${PF}/var/${a}
91 done
92
93 webapp_configfile "${MY_HOSTROOTDIR}"/${PF}/Kernel/Config.pm
94 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.txt
95 webapp_hook_script "${FILESDIR}"/reconfig-2
96 webapp_src_install
97 }
98
99 pkg_postinst() {
100 ewarn "webapp-config will not be run automatically"
101 ewarn "That messes up Apache configs"
102 ewarn "Don't run webapp-config with -d otrs. Instead, try"
103 ewarn "webapp-config -I -h <host> -d ot ${PN} ${PVR}"
104 ewarn
105 if ! use apache2; then
106 ewarn "You did not activate the USE-flag apache2 which means you"
107 ewarn "will need to create the otrs user yourself. Make this user"
108 ewarn "a member of your webserver group."
109 fi
110 # webapp_pkg_postinst
111 }

  ViewVC Help
Powered by ViewVC 1.1.20