/[gentoo-x86]/net-fs/samba/samba-4.0.0_rc3.ebuild
Gentoo

Contents of /net-fs/samba/samba-4.0.0_rc3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Oct 19 08:10:00 2012 UTC (22 months, 4 weeks ago) by swift
Branch: MAIN
Changes since 1.1: +4 -3 lines
Refix bug #62907 - Add in dependency on SELinux samba policy

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-4.0.0_rc3.ebuild,v 1.1 2012/10/16 21:29:44 vostorga Exp $
4
5 EAPI=4
6 PYTHON_DEPEND="2"
7
8 inherit confutils python waf-utils multilib linux-info
9
10 MY_PV="${PV/_rc/rc}"
11 MY_P="${PN}-${MY_PV}"
12
13 if [ "${PV}" = "4.9999" ]; then
14 EGIT_REPO_URI="git://git.samba.org/samba.git"
15 KEYWORDS=""
16 inherit git-2
17 else
18 SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
19 KEYWORDS="~amd64 ~x86"
20 fi
21
22 DESCRIPTION="Samba Suite Version 4"
23 HOMEPAGE="http://www.samba.org/"
24 LICENSE="GPL-3"
25
26 SLOT="0"
27
28 IUSE="acl addns ads aio avahi client cluster cups debug fulltest gnutls iprint
29 ldap pam quota selinux swat syslog winbind"
30
31 RDEPEND="dev-libs/iniparser
32 dev-libs/popt
33 sys-libs/readline
34 virtual/libiconv
35 >=dev-lang/python-2.4.2
36 dev-python/subunit
37 sys-libs/libcap
38 >=sys-libs/ldb-1.1.12
39 >=sys-libs/tdb-1.2.10[python]
40 >=sys-libs/talloc-2.0.7[python]
41 >=sys-libs/tevent-0.9.17
42 sys-libs/zlib
43 >=app-crypt/heimdal-1.5[-ssl]
44 ads? ( client? ( net-fs/cifs-utils[ads] ) )
45 client? ( net-fs/cifs-utils )
46 cluster? ( >=dev-db/ctdb-1.0.114_p1 )
47 ldap? ( net-nds/openldap )
48 gnutls? ( >=net-libs/gnutls-1.4.0 )
49 selinux? ( sec-policy/selinux-samba )"
50 DEPEND="${RDEPEND}
51 virtual/pkgconfig"
52
53 RESTRICT="mirror"
54
55 S="${WORKDIR}/${MY_P}"
56
57 CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
58
59 WAF_BINARY="${S}/buildtools/bin/waf"
60
61 pkg_setup() {
62 confutils_use_depend_all fulltest test
63
64 python_set_active_version 2
65 python_pkg_setup
66
67 if use aio; then
68 if ! linux_config_exists || ! linux_chkconfig_present AIO; then
69 ewarn "You must enable AIO support in your kernel config, "
70 ewarn "to be able to support asynchronous I/O. "
71 ewarn "You can find it at"
72 ewarn
73 ewarn "General Support"
74 ewarn " Enable AIO support "
75 ewarn
76 ewarn "and recompile your kernel..."
77 fi
78 fi
79 }
80
81 src_configure() {
82 local myconf=''
83 if use "debug"; then
84 myconf="${myconf} --enable-developer"
85 fi
86 if use "cluster"; then
87 myconf="${myconf} --with-ctdb-dir=/usr"
88 fi
89 myconf="${myconf} \
90 --enable-fhs \
91 --sysconfdir=/etc \
92 --localstatedir=/var \
93 --with-modulesdir=/usr/$(get_libdir) \
94 --disable-rpath \
95 --disable-rpath-install \
96 --nopyc \
97 --nopyo \
98 --disable-ntdb \
99 --bundled-libraries=NONE \
100 --builtin-libraries=NONE \
101 $(use_with addns dnsupdate) \
102 $(use_with acl) \
103 $(use_with ads) \
104 $(use_with aio aio-support) \
105 $(use_enable avahi) \
106 $(use_with cluster cluster-support) \
107 $(use_enable cups) \
108 $(use_enable gnutls) \
109 $(use_enable iprint) \
110 $(use_with ldap) \
111 $(use_with pam) \
112 $(use_with pam pam_smbpass) \
113 $(use_with quota) \
114 $(use_with syslog) \
115 $(use_with swat) \
116 $(use_with winbind)"
117 CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" \
118 waf-utils_src_configure ${myconf}
119 }
120
121 src_install() {
122 waf-utils_src_install
123
124 # Make all .so files executable
125 find "${D}" -type f -name "*.so" -exec chmod +x {} +
126
127 # Move all LDB modules to their correct path
128 mkdir -p "${D}"/usr/$(get_libdir)/ldb/modules/ldb
129 mv "${D}"/usr/$(get_libdir)/ldb/*.so "${D}"/usr/$(get_libdir)/ldb/modules/ldb
130
131 # Install init script
132 newinitd "${CONFDIR}/samba4.initd" samba || die "newinitd failed"
133 }
134
135 src_test() {
136 local extra_opts=""
137 use fulltest || extra_opts+="--quick"
138 "${WAF_BINARY}" test ${extra_opts} || die "test failed"
139 }
140
141 pkg_postinst() {
142 # Optimize the python modules so they get properly removed
143 python_mod_optimize "${PN}"
144
145 # Warn that it's a release candidate
146 ewarn "This is not a final Samba release, however the Samba Team is now making"
147 ewarn "good progress towards a Samba 4.0 release, of which this is a preview."
148 ewarn "Be aware the this release contains the best of all of Samba's"
149 ewarn "technology parts, both a file server (that you can reasonably expect"
150 ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
151 ewarn "controller work previously known as 'samba4'."
152
153 einfo "See http://wiki.samba.org/index.php/Samba4/HOWTO for more"
154 einfo "information about samba 4."
155 }
156
157 pkg_postrm() {
158 # Clean up the python modules
159 python_mod_cleanup "${PN}"
160 }

  ViewVC Help
Powered by ViewVC 1.1.20