dev-util/strace: Removed old.
[gentoo.git] / net-nds / gosa-core / gosa-core-2.6.12.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=4
5
6 inherit eutils
7
8 DESCRIPTION="LDAP administration frontend for user administration"
9 HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
10 SRC_URI="ftp://oss.gonicus.de/pub/gosa/${P}.tar.bz2
11         http://oss.gonicus.de/pub/gosa/${P}.tar.bz2
12         ftp://oss.gonicus.de/pub/gosa/archive/${P}.tar.bz2
13         http://oss.gonicus.de/pub/gosa/archive/${P}.tar.bz2     "
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64"
18 IUSE="mail samba"
19
20 DEPEND="dev-lang/php[iconv,imap,ldap,mysql,session,zip]
21         sys-devel/gettext"
22 RDEPEND="${DEPEND}
23         virtual/httpd-php
24         dev-perl/Crypt-SmbHash
25         media-gfx/imagemagick"
26 PDEPEND="mail? ( ~net-nds/gosa-plugin-mail-${PV} )
27         samba? ( ~net-nds/gosa-plugin-samba-${PV} )"
28
29 src_prepare() {
30         epatch \
31                 "${S}/redhat/02_fix_class_mapping.patch" \
32                 "${S}/redhat/03_fix_locale_location.patch" \
33                 "${S}/redhat/04_fix_online_help_location.patch"
34         sed -i \
35                 -e 's|../contrib|/usr/share/gosa/template|' \
36                 include/functions.inc || die "sed failed"
37 }
38
39 src_install() {
40         insinto /usr/share/gosa
41         doins -r doc html ihtml include locale plugins setup
42
43         insinto /usr/share/gosa/template
44         doins contrib/gosa.conf
45
46         dosbin \
47                 update-gosa \
48                 bin/gosa-encrypt-passwords
49
50         dobin \
51                 update-locale \
52                 update-online-help \
53                 update-pdf-help \
54                 dh-make-gosa \
55                 contrib/gosa
56
57         insinto /etc/gosa
58         doins \
59                 contrib/shells \
60                 contrib/encodings \
61                 contrib/desktoprc
62         touch "${D}/etc/gosa/gosa.secrets"
63
64         doicon debian/*.xpm
65         domenu debian/gosa-desktop.desktop
66
67         doman *.1 contrib/*.1 contrib/*.5
68
69         dodoc contrib/openldap/slapd.conf
70         insinto /etc/openldap/schema/gosa
71         doins contrib/openldap/*.schema
72
73         insinto /etc/apache2/vhosts.d
74         doins "${FILESDIR}/gosa.include"
75
76         dodoc AUTHORS Changelog FAQ README README.safemode
77
78         keepdir /etc/gosa
79         keepdir /var/spool/gosa
80         keepdir /var/cache/gosa
81 }
82
83 pkg_prerm() {
84         ebegin "Flushing the class and locale cache"
85         rm -r "${EROOT}"var/cache/gosa/*
86         eend $?
87         ebegin "Clearing the spool directory"
88         rm -r "${EROOT}"var/spool/gosa/*
89         eend $?
90 }
91
92 pkg_postinst() {
93         ebegin "Generating class cache and locales"
94         "${EROOT}"usr/sbin/update-gosa
95         eend $?
96
97         elog "Please make sure that the web server you are going to use has"
98         elog "read-write access to ${EROOT}var/spool/gosa"
99
100         elog "For Apache there is the gosa.include file in ${EROOT}etc/apache/vhosts.d."
101         elog "You can either use it as a template for your configuration or directly"
102         elog "include it in your apache configuration."
103
104         elog "GOsa requires some objectclasses and attributes to be present in the"
105         elog "directory. A sample configuration for slapd.conf can be found here:"
106         elog "    ${EROOR}usr/share/doc/${PF}/slapd.conf[.gz]"
107 }