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

Contents of /net-fs/samba/samba-4.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jan 21 21:43:47 2013 UTC (20 months ago) by vostorga
Branch: MAIN
Changes since 1.1: +2 -2 lines
Fixing up modules dir

(Portage version: 2.1.11.31/cvs/Linux i686, signed Manifest commit with key 0xE25EE336)

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-fs/samba/samba-4.0.1.ebuild,v 1.1 2013/01/15 20:46:15 vostorga Exp $
4
5 EAPI=4
6 PYTHON_DEPEND="2"
7
8 inherit 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/stable/${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 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.13
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 client? ( net-fs/cifs-utils[ads?] )
45 cluster? ( >=dev-db/ctdb-1.0.114_p1 )
46 ldap? ( net-nds/openldap )
47 gnutls? ( >=net-libs/gnutls-1.4.0 )
48 selinux? ( sec-policy/selinux-samba )"
49 DEPEND="${RDEPEND}
50 virtual/pkgconfig"
51
52 REQUIRED_USE="ads? ( ldap )"
53
54 RESTRICT="mirror"
55
56 S="${WORKDIR}/${MY_P}"
57
58 CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
59
60 WAF_BINARY="${S}/buildtools/bin/waf"
61
62 pkg_setup() {
63 python_set_active_version 2
64 python_pkg_setup
65
66 if use aio; then
67 if ! linux_config_exists || ! linux_chkconfig_present AIO; then
68 ewarn "You must enable AIO support in your kernel config, "
69 ewarn "to be able to support asynchronous I/O. "
70 ewarn "You can find it at"
71 ewarn
72 ewarn "General Support"
73 ewarn " Enable AIO support "
74 ewarn
75 ewarn "and recompile your kernel..."
76 fi
77 fi
78 }
79
80 src_configure() {
81 local myconf=''
82 use "cluster" && myconf+=" --with-ctdb-dir=/usr"
83 use "test" && myconf+=" --enable-selftest"
84 myconf="${myconf} \
85 --enable-fhs \
86 --sysconfdir=/etc \
87 --localstatedir=/var \
88 --with-modulesdir=/usr/$(get_libdir)/samba \
89 --disable-rpath \
90 --disable-rpath-install \
91 --nopyc \
92 --nopyo \
93 --disable-ntdb \
94 --bundled-libraries=NONE \
95 --builtin-libraries=NONE \
96 $(use_with addns dnsupdate) \
97 $(use_with acl) \
98 $(use_with ads) \
99 $(use_with aio aio-support) \
100 $(use_enable avahi) \
101 $(use_with cluster cluster-support) \
102 $(use_enable cups) \
103 $(use_enable gnutls) \
104 $(use_enable iprint) \
105 $(use_with ldap) \
106 $(use_with pam) \
107 $(use_with pam pam_smbpass) \
108 $(use_with quota) \
109 $(use_with syslog) \
110 $(use_with swat) \
111 $(use_with winbind)
112 "
113 CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" \
114 waf-utils_src_configure ${myconf}
115 }
116
117 src_install() {
118 waf-utils_src_install
119
120 # Make all .so files executable
121 find "${D}" -type f -name "*.so" -exec chmod +x {} +
122
123 # Move all LDB modules to their correct path
124 mkdir -p "${D}"/usr/$(get_libdir)/ldb/modules/ldb
125 mv "${D}"/usr/$(get_libdir)/ldb/*.so "${D}"/usr/$(get_libdir)/ldb/modules/ldb
126
127 # Install init script and conf.d file
128 newinitd "${CONFDIR}/samba4.initd-r1" samba
129 newconfd "${CONFDIR}/samba4.confd" samba
130 }
131
132 src_test() {
133 "${WAF_BINARY}" test || die "test failed"
134 }
135
136 pkg_postinst() {
137 # Optimize the python modules so they get properly removed
138 python_mod_optimize "${PN}"
139
140 elog "This is is the first stable release of Samba 4.0"
141
142 ewarn "Be aware the this release contains the best of all of Samba's"
143 ewarn "technology parts, both a file server (that you can reasonably expect"
144 ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
145 ewarn "controller work previously known as 'samba4'."
146
147 elog "For further information and migration steps make sure to read "
148 elog "http://samba.org/samba/history/${P}.html "
149 elog "http://samba.org/samba/history/${PN}-4.0.0.html and"
150 elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
151 }
152
153 pkg_postrm() {
154 # Clean up the python modules
155 python_mod_cleanup "${PN}"
156 }

  ViewVC Help
Powered by ViewVC 1.1.20