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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Nov 20 16:48:45 2005 UTC (12 years, 11 months ago) by stuart
Branch: MAIN
Changes since 1.1: +1 -2 lines
Fixed broken DEPEND
(Portage version: 2.0.51.22-r3)

1 rl03 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 stuart 1.2 # $Header: /var/cvsroot/gentoo-x86/www-apps/otrs/otrs-1.3.2.ebuild,v 1.1 2005/08/02 01:59:56 rl03 Exp $
4 rl03 1.1
5     inherit webapp eutils
6    
7     S=${WORKDIR}/${PN}
8    
9     IUSE="mysql postgres 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     perl-core/CGI
22     perl-core/Digest-MD5
23     dev-perl/libwww-perl
24     dev-perl/IO-stringy
25     perl-core/MIME-Base64
26     dev-perl/MIME-tools
27     dev-perl/MailTools
28     dev-perl/Net-DNS
29     dev-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 =www-apache/mod_perl-2* )
41     !apache2? ( =net-www/apache-1* =www-apache/mod_perl-1* )
42     gd? ( dev-perl/GD dev-perl/GDTextUtil dev-perl/GDGraph )
43     "
44    
45     LICENSE="GPL-2"
46    
47     pkg_setup() {
48     webapp_pkg_setup
49     enewuser otrs -1 -1 /dev/null apache
50     if ! use vhosts; then
51     ewarn
52     ewarn "otrs will be installed using webapp-config -d otrs,"
53     ewarn "which may mess up Apache configs."
54     ewarn "If that happens, re-emerge with USE=\"vhosts\""
55     ewarn
56     fi
57     }
58    
59     src_unpack() {
60     unpack ${A}
61     cp ${S}/Kernel/Config.pm.dist ${S}/Kernel/Config.pm
62     cd ${S}/Kernel/Config/
63     for foo in *.dist; do cp ${foo} `basename ${foo} .dist`; done
64    
65     cd ${S}/scripts
66     rm -rf auto_* redhat* suse*
67     }
68    
69     src_install() {
70     webapp_src_preinst
71     dodir ${MY_HOSTROOTDIR}/${PF}
72    
73     # install documentation
74     dodoc CHANGES CREDITS INSTALL README* TODO UPGRADING \
75     doc/otrs-database.dia doc/test-* doc/X-OTRS-Headers.txt \
76     .fetchmailrc .mailfilter .procmailrc
77     dohtml doc/manual/{en,de}/html/*
78    
79     # copy main files
80     cp -R .fetchmailrc .mailfilter .procmailrc RELEASE Kernel bin scripts var ${D}/${MY_HOSTROOTDIR}/${PF}
81     mv ${D}/${MY_HOSTROOTDIR}/${PF}/var/httpd/htdocs/* ${D}/${MY_HTDOCSDIR}
82    
83     # remove stuff from ${D} that shouldn't be there
84     rm -rf ${D}/${MY_HOSTROOTDIR}/${PF}/var/httpd
85    
86     # keep some empty dirs
87     local a
88     local 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     # helpers
94     webapp_configfile ${MY_HOSTROOTDIR}/${PF}/Kernel/Config.pm
95     webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
96     webapp_hook_script ${FILESDIR}/reconfig
97     webapp_src_install
98     }
99    
100     pkg_postinst() {
101     use vhosts && {
102     ewarn
103     ewarn "Don't run webapp-config with -d otrs."
104     ewarn "That will mess up Apache configs."
105     ewarn "Use something like -d ot"
106     ewarn
107     }
108     webapp_pkg_postinst
109     }

  ViewVC Help
Powered by ViewVC 1.1.20