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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Oct 20 02:46:11 2006 UTC (12 years, 1 month ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Need dev-perl/TimeDate, bug #151328.
(Portage version: 2.1.2_pre1)
 (Signed Manifest commit)

1 # Copyright 1999-2006 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.0.3.ebuild,v 1.4 2006/02/13 15:20:06 mcummings Exp $
4
5 inherit webapp eutils
6
7 S=${WORKDIR}/${PN}
8
9 IUSE="mysql postgres fastcgi apache2 ldap gd"
10
11 DESCRIPTION="OTRS is an Open source Ticket Request System"
12 HOMEPAGE="http://otrs.org/"
13 SRC_URI="ftp://ftp.otrs.org/pub/${PN}/${P}-01.tar.bz2"
14
15 KEYWORDS="~x86 ~ppc"
16
17 DEPEND="
18 =dev-lang/perl-5*
19 dev-perl/Date-Pcalc
20 dev-perl/DBI
21 virtual/perl-CGI
22 virtual/perl-Digest-MD5
23 dev-perl/libwww-perl
24 dev-perl/IO-stringy
25 virtual/perl-MIME-Base64
26 dev-perl/MIME-tools
27 dev-perl/MailTools
28 dev-perl/Net-DNS
29 virtual/perl-libnet
30 dev-perl/Authen-SASL
31 dev-perl/XML-Parser
32 "
33
34 RDEPEND="
35 ${DEPEND}
36 virtual/mta
37 ldap? ( dev-perl/perl-ldap net-nds/openldap )
38 mysql? ( =dev-db/mysql-4* dev-perl/DBD-mysql )
39 postgres? ( dev-db/postgresql dev-perl/DBD-Pg )
40 apache2? ( >=net-www/apache-2
41 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
42 !fastcgi? ( =www-apache/libapreq2-2* ) )
43 !apache2? ( =net-www/apache-1*
44 fastcgi? ( dev-perl/FCGI net-www/mod_fastcgi )
45 !fastcgi? ( =www-apache/libapreq-1* ) )
46 gd? ( dev-perl/GD dev-perl/GDTextUtil dev-perl/GDGraph )
47 "
48
49 LICENSE="GPL-2"
50
51 pkg_setup() {
52 webapp_pkg_setup
53 enewuser otrs -1 -1 /dev/null apache
54 if ! use vhosts; then
55 ewarn
56 ewarn "otrs will be installed using webapp-config -d otrs,"
57 ewarn "which may mess up Apache configs."
58 ewarn "If that happens, re-emerge with USE=\"vhosts\""
59 ewarn
60 fi
61 }
62
63 src_unpack() {
64 unpack ${A}
65 cp ${S}/Kernel/Config.pm.dist ${S}/Kernel/Config.pm
66 cd ${S}/Kernel/Config/
67 for foo in *.dist; do cp ${foo} `basename ${foo} .dist`; done
68
69 cd ${S}/scripts
70 rm -rf auto_* redhat* suse*
71
72 if use fastcgi; then
73 if ! use apache2; then
74 epatch ${FILESDIR}/apache1.patch
75 sed -e "s|cgi-bin|fcgi-bin|" -i ${S}/scripts/apache-httpd.include.conf
76 fi
77 if use apache2; then
78 epatch ${FILESDIR}/apache2.patch
79 sed -e "s|cgi-bin|fcgi-bin|" -i ${S}/scripts/apache2-httpd.include.conf
80 fi
81 sed -e "s|index.pl|index.fpl|" -i ${S}/var/httpd/htdocs/index.html
82 fi
83 }
84
85 src_install() {
86 webapp_src_preinst
87 dodir ${MY_HOSTROOTDIR}/${PF}
88
89 # install documentation
90 dodoc CHANGES CREDITS INSTALL README* TODO UPGRADING \
91 doc/otrs-database.dia doc/test-* doc/X-OTRS-Headers.txt \
92 .fetchmailrc.dist .mailfilter.dist .procmailrc.dist
93 dohtml doc/manual/{en,de}/html/*
94
95 # copy main files
96 cp -R .fetchmailrc.dist .mailfilter.dist .procmailrc.dist RELEASE Kernel bin scripts var ${D}/${MY_HOSTROOTDIR}/${PF}
97 mv ${D}/${MY_HOSTROOTDIR}/${PF}/var/httpd/htdocs/* ${D}/${MY_HTDOCSDIR}
98
99 # remove stuff from ${D} that shouldn't be there
100 rm -rf ${D}/${MY_HOSTROOTDIR}/${PF}/var/httpd
101
102 # keep some empty dirs
103 local a
104 local d="article log pics/images pics/stats pics sessions spool tmp"
105 for a in ${d}; do
106 keepdir ${MY_HOSTROOTDIR}/${PF}/var/${a}
107 done
108
109 # helpers
110 webapp_configfile ${MY_HOSTROOTDIR}/${PF}/Kernel/Config.pm
111 webapp_postinst_txt en ${FILESDIR}/postinstall-en-2.txt
112 webapp_hook_script ${FILESDIR}/reconfig-2
113 webapp_src_install
114 }
115
116 pkg_postinst() {
117 use vhosts && {
118 ewarn
119 ewarn "Don't run webapp-config with -d otrs."
120 ewarn "That will mess up Apache configs."
121 ewarn "Use something like -d ot"
122 ewarn
123 }
124 webapp_pkg_postinst
125 }

  ViewVC Help
Powered by ViewVC 1.1.20