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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Oct 23 22:07:59 2005 UTC (12 years, 11 months ago) by rl03
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump
(Portage version: 2.0.51.22-r2)

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

  ViewVC Help
Powered by ViewVC 1.1.20