/[gentoo-x86]/net-nds/389-admin/389-admin-1.1.31.ebuild
Gentoo

Contents of /net-nds/389-admin/389-admin-1.1.31.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Mar 14 18:02:26 2013 UTC (15 months, 4 weeks ago) by lxnay
Branch: MAIN
version bump, migrate to openldap

(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key ADC916E5)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-nds/389-admin/389-admin-1.1.23.ebuild,v 1.2 2011/08/16 20:15:51 lxnay Exp $
4
5 EAPI=5
6
7 WANT_AUTOMAKE="1.9"
8
9 MY_PV=${PV/_rc/.rc}
10 MY_PV=${MY_PV/_a/.a}
11
12 inherit eutils multilib autotools depend.apache
13
14 DESCRIPTION="389 Directory Server (admin)"
15 HOMEPAGE="http://port389.org/"
16 SRC_URI="http://directory.fedoraproject.org/sources/${PN}-${MY_PV}.tar.bz2"
17
18 LICENSE="GPL-2 Apache-2.0"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="debug ipv6 selinux"
22
23 # TODO snmp agent init script
24
25 COMMON_DEPEND=">=app-admin/389-admin-console-1.1.0
26 >=app-admin/389-ds-console-1.1.0
27 app-misc/mime-types
28 dev-libs/389-adminutil
29 dev-libs/cyrus-sasl
30 dev-libs/icu
31 dev-libs/nss[utils]
32 || ( <=dev-libs/nspr-4.8.3-r3[ipv6?] >=dev-libs/nspr-4.8.4 )
33 dev-libs/svrcore
34 net-analyzer/net-snmp[ipv6?]
35 net-nds/openldap
36 selinux? (
37 sys-apps/checkpolicy
38 sys-apps/policycoreutils
39 sec-policy/selinux-base-policy
40 )
41 >=sys-libs/db-4.2.52
42 sys-libs/pam
43 sys-apps/tcp-wrappers[ipv6?]
44 www-apache/mod_nss
45 www-servers/apache:2[apache2_modules_actions,apache2_modules_alias,apache2_modules_auth_basic,apache2_modules_authz_default,apache2_modules_cgi,apache2_modules_mime_magic,apache2_modules_rewrite,apache2_modules_setenvif,suexec,threads]"
46 RDEPEND="${COMMON_DEPEND} www-client/lynx"
47 DEPEND="sys-apps/sed ${COMMON_DEPEND}"
48
49 S="${WORKDIR}/${PN}-${MY_PV}"
50
51 need_apache2_2
52
53 src_prepare() {
54 # as per 389 documentation, when 64bit, export USE_64
55 use amd64 && export USE_64=1
56
57 epatch "${FILESDIR}/1.1.11_rc1/0001-gentoo-apache-names.patch"
58 epatch "${FILESDIR}/1.1.11_rc1/0003-find-mod_nss.m4.patch"
59 epatch "${FILESDIR}/1.1.11_rc1/0004-rpath-fix.configure.ac.patch"
60 # Configuration fixes
61 epatch "${FILESDIR}/${PN}-cfgstuff-1.patch"
62
63 sed -e "s!SUBDIRS!# SUBDIRS!g" -i Makefile.am || die "sed failed"
64 # Setup default user/group, in this case it's dirsrv
65 sed -e "s!nobody!dirsrv!g" -i configure.ac || die "sed failed"
66
67 eautoreconf
68 }
69
70 src_configure() {
71 # stub autoconf triplet :(
72 local myconf=""
73 use debug && myconf="--enable-debug"
74 use selinux && myconf="${myconf} --with-selinux"
75
76 econf \
77 --enable-threading \
78 --disable-rpath \
79 --with-adminutil=/usr \
80 --with-apr-config \
81 --with-apxs=${APXS} \
82 --with-fhs \
83 --with-httpd=${APACHE_BIN} \
84 --with-openldap \
85 ${myconf} || die "econf failed"
86 }
87
88 src_install () {
89
90 emake DESTDIR="${D}" install || die "emake failed"
91 keepdir /var/log/dirsrv/admin-serv
92
93 # remove redhat style init script.
94 rm -rf "${D}"/etc/rc.d
95 rm -rf "${D}"/etc/default
96
97 # install gentoo style init script.
98 newinitd "${FILESDIR}"/${PN}.initd ${PN}
99 newconfd "${FILESDIR}"/${PN}.confd ${PN}
100
101 # remove redhat style wrapper scripts
102 # and install gentoo scripts.
103 rm -rf "${D}"/usr/sbin/*-ds-admin
104 dosbin "${FILESDIR}"/*-ds-admin || die "cannot install gentoo start/stop scripts"
105
106 # In this version build systems for modules is delete :(
107 # manually install modules, not using apache-modules eclass
108 # because use bindled library
109
110 # install mod_admserv
111 exeinto "${APACHE_MODULESDIR}"
112 doexe "${S}/.libs"/mod_admserv.so || die "internal ebuild error: mod_admserv not found"
113
114 insinto "${APACHE_MODULES_CONFDIR}"
115 newins "${FILESDIR}/1.1.11_rc1"/48_mod_admserv.conf 48_mod_admserv \
116 || die "internal ebuild error: 48_mod_admserv.conf not found"
117
118 # install mod_restard
119 exeinto "${APACHE_MODULESDIR}"
120 doexe "${S}/.libs"/mod_restartd.so || die "internal ebuild error: mod_restartd not found"
121
122 insinto "${APACHE_MODULES_CONFDIR}"
123 newins "${FILESDIR}/1.1.11_rc1"/48_mod_restartd.conf 48_mod_restartd \
124 || die "internal ebuild error: 48_mod_restard.conf not found"
125
126 if use selinux; then
127 local POLICY_TYPES="targeted"
128 cd "${S}"/selinux || die
129 cp /usr/share/selinux/${POLICY_TYPES}/include/Makefile . || die
130 make || die "selinux policy compile failed"
131 insinto /usr/share/selinux/${POLICY_TYPES}
132 doins -r "${S}/selinux/"*.pp
133 fi
134
135 }
136
137 pkg_postinst() {
138
139 # show setup information
140 elog "Once you configured www-servers/apache as written above,"
141 elog "you need to run (as root): /usr/sbin/setup-ds-admin.pl"
142 elog
143
144 # show security and sysctl info
145 elog "It is recommended to setup net.ipv4.tcp_keep_alive_time"
146 elog "in /etc/sysctl.conf (or via sysctl -w && sysctl -p) to a reasonable"
147 elog "value (in milliseconds) to avoid temporary server congestions"
148 elog "from lost client connections"
149 elog
150
151 # /etc/security/limits.conf settings
152 elog "It is also recommended to fine tune the maximum open files"
153 elog "settings inside /etc/security/limits.conf:"
154 elog "* soft nofile 2048"
155 elog "* hard nofile 4096"
156 elog
157
158 elog "To start 389 Directory Server Administration Interface at boot"
159 elog "please add 389-admin service to the default runlevel:"
160 elog
161 elog " rc-update add 389-admin default"
162 elog
163
164 elog "for 389 Directory Server Admin interface to work, you need"
165 elog "to setup a FQDN hostname and use it while running /usr/sbin/setup-ds-admin.pl"
166 elog
167
168 }

  ViewVC Help
Powered by ViewVC 1.1.20