summaryrefslogtreecommitdiff
path: root/net-fs/samba
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/samba')
-rw-r--r--net-fs/samba/Manifest6
-rw-r--r--net-fs/samba/files/samba-4.8.6-no-pydsdb-when-no-addc.patch36
-rw-r--r--net-fs/samba/files/samba-4.9.2-timespec.patch21
-rw-r--r--net-fs/samba/samba-4.8.6-r2.ebuild (renamed from net-fs/samba/samba-4.8.6.ebuild)3
-rw-r--r--net-fs/samba/samba-4.9.2-r1.ebuild291
5 files changed, 355 insertions, 2 deletions
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index b9c991cc5adc..67727fee71e3 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -4,6 +4,8 @@ AUX nmbd.service 224 BLAKE2B 499598b7e80f3dddbcc0b2d3ba217774cfcd7d87cc5287bdc75
AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8fd9be2271709da5c113625e80ae3783975b725c515004382bea65336ef725241079081cec213e81cc6e3056 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c
AUX samba-4.5.1-compile_et_fix.patch 762 BLAKE2B 432d8380e3511c3dbb408479d0152fb0760e9e487a3033718fa39b9ca4a87a04c9cf8ac41a4b9268020a1d41dee9efa5bde3f0e71498483102fcae80749ad62c SHA512 9605751653dcbbce41be807a9b4f8e5f657db6622f843e91c4df9c4b3e4ad621b6e8e3891f2b970208d55a80801355988f253e3c844ca51a658cd6de8c373e24
AUX samba-4.7.3-krb-cross-compile.patch 1590 BLAKE2B 34cf304441731556556e40ed386f110dd8aa26a49680fa106b550edede86842e736c5652cd4aa54f0da7955600442cbc41350031dc8b67deae11f68050a6cf7c SHA512 0f762326f5b72d10e4c553630a8c4c433de884d80024c26e4f0e46b26bc24ac53c07642d833bb327f0010b7ee0ce2df05a94dc8868f3f363f68f9851b76265c5
+AUX samba-4.8.6-no-pydsdb-when-no-addc.patch 1493 BLAKE2B ce0de6426170645c15bdc4832fd35d8dcd6de9c1ce014846d3c8bbbb4d8f6c654c0e6a02252186f9de76d0735ac808d0326b1c57e9e98c00a357792430fbd4bf SHA512 f3e5c9ce1e75e8332e38ad33a637d7f687a77c8586511aad252db0176b4483e9e6a8ede09d7d448a0146d35f141d61a937561e16029606d08047974ee58dd982
+AUX samba-4.9.2-timespec.patch 701 BLAKE2B 8bb49dcc4a2e8219a66737e6211b1f597bba9f64622c750fbd5334c60f7d69fd61030422cc4259dd83068b820276a5ce873f59560e9a54a9891a1d7d213ce47a SHA512 9aeaa8a4359828f34cc66a92b88579592580435fd0992b9dfe5b541c9b08e103bef644a0049dfc29f305c1dd3ca3b87f378957f9afae95cfb2c72bfb6e44941c
AUX samba-glibc-2.26-no_rpc.patch 631 BLAKE2B 22e414bcd329d7d32381c61ad4341de69a07235447dc4116855cca9ce99d32a5ffe111602fdf6ea02c6fe9c5b3331ecaec974faa5e22e009f15964296b53825a SHA512 18a466cbe42313f096ebeb635e5738b59672e96fd5c7db80cff5aa96c0edeb359b6833967bfac09eb5c010eec4309b3b73c0f941173b520918939974fa599541
AUX samba.conf 61 BLAKE2B fff77908503f3718cdcf04b60eda6bf717fb37628107676ed66133da235af95ac91d6209f97830de7a5bfdee9e25f850334bb445ee22110d14eb82e1b399694c SHA512 4a75185762c90d110c399215fbfc939d30804b558ffdb11cc68dee6f87a94c86cadbcd63935884db1266cf40fe24fefb75f9067fe4751ad9838d7a43e8973b9e
AUX samba.service 199 BLAKE2B 5949503c588684a48ab0a26f5811bb053d8527eb9da2ecc8b4bd911ea6d51969bc9607b14f3f72394127ff24967849d3e829a05b6584ba3f3de5e640d240c204 SHA512 eb277917f15de958f4a0404b66c6d2cc82ae4319b85f2f442489988d523bf92e2a9d23a6051ee693cd4bcfbc67947e8028c59906ad3e537578daf5caee8a6f16
@@ -19,10 +21,12 @@ DIST samba-4.7.11.tar.gz 16918373 BLAKE2B 3d74c3b7c6ce0563474ab01583320b31cf37af
DIST samba-4.8.5.tar.gz 17715401 BLAKE2B fc1aef2f5362fff1870abe40eebfe932f5ca347e65d1a2502ee19c9fce8cbf71e3f4181a18056d8d6b3e92d2515f946e3dc746b00f2398d91f88b1172e91cd43 SHA512 23a88c48214c3bf4cbc135cb84873bb8d12f32187ccbda47b02495fa4a12458f103de5e968e8f9a5958c116f618332cfffbf54d084e4f1e363fbf079b897e3a0
DIST samba-4.8.6.tar.gz 17723841 BLAKE2B 38da52e14b4417f26462eef2226c4498e54d2c276b4056e8c6d6c66079f33bcda24c1eab30b29bc7413280ec89a74a55e043e8274ac50f9a25bae7563717ff34 SHA512 f6afab5ca466bd8653a56c205b71ce94ecf0ad0c6e4c9d64cbba7b1e56f1987bc2022e6b629d87eb6078e3f6ba53833c19cfb41e40b6d589e4317ea9d85de273
DIST samba-4.9.1.tar.gz 18018259 BLAKE2B 783423098864c391f08b30e05b70308e922bdb4dad08b8b0b4d1112808357b9bb96aad7a094d0fe2e308f84a143d5f90be523b9c3551a3068ecdcad7347613f6 SHA512 267673b6d6ab0db59063480c20f02e5864ef96e9ad1097c23a99b2ab4b5fd2252193d7a152729b40cae0751fb9b0b108b087a190f5db11eabbd075224bd6e663
+DIST samba-4.9.2.tar.gz 18042752 BLAKE2B e6d361a38f1103c104015987fa2b67c49a91fb2fac77538b3d9fa0c1629348df00c8fb4ea0dbb1a1f3f62cd377699c1ebc00b1b1b7b1e0d073d3633d41a62e7b SHA512 67de5faeda45e5c245bf02cc195cdf9ca4b63f17625837badf7c50d97250e94de5309c9ef824bd7890bc771b1dc0a3bfbafea09880850b5167f0bf8a8ef488ed
EBUILD samba-4.5.16.ebuild 8166 BLAKE2B 2a0d68ff2848c1dee76d8329cab4f5a0b06bcac989b55a97bac1211f194b4c10736d8fd99eb32779c86406c8aa4c45523af34f43f70eebf928e4ceb787d374e3 SHA512 5a3e1645ec3d05ddf26e66f75cc2f43c86baad8b08e40e137919f0b33d68701cef8460fd3da3d080905af538659b834169e66cc946517ed1c9190dc52ac697d3
EBUILD samba-4.7.10.ebuild 8797 BLAKE2B 55cd5751599f69205abb9c6db4c575db7956dad63c1c74502d2249b88c480d21011911ea8d70cc47c7eb42304b4b20c04a3b9ab3f549726633c3514476b4fa8f SHA512 4c53c7748ad3acd4f4fc687eaa9d40808f5ec1b5bb02d97df46d3517ae4727343af29cf689065c483addeca86109561696156f77cdcb7edb5a835c17c7b96f62
EBUILD samba-4.7.11.ebuild 8794 BLAKE2B 63af65ccb9ab8f40b7496e16a9b03a6d070726389bc053b85fa90be6dedfeef6f2915106f6f7900d56e66ac4c7d106b66aba999ec1119f8d21990477d6ebca55 SHA512 fe0b5f1c17c37f7473bc8f3bb7a747d59251f2d6742db1012b68a2293a5f753d70ded1055cb8657c8f3de8aea9d29bd1ca6f65e55a9aa74b45e463ff576e042f
EBUILD samba-4.8.5.ebuild 8408 BLAKE2B 518354a225c001dbc3153e7fcb7f071b56e78108fcee69454bc04d92ef1c43e9b16703118e5926bf7ee3a189f19f2c0a02a2e1d251e909c73b8222cf5b326136 SHA512 b169a47c7b5967988874e549566102b18794c031b353dd5f7dc6ed47f4c5cfa36b5afc236f3c95a2937af8c76206c83ed4eb4297aa7202945aee9e62eaad6abf
-EBUILD samba-4.8.6.ebuild 8403 BLAKE2B e2ed93337f2123c01fb55f49fc302d783fb87b2347a88af50398371f9365d2e68a81043c7f895a058f70ad055e94db4ac103e2e5441b9e88e2e7eef2ab74deda SHA512 751bb195c25028e7ec7ad3e31c91b7e15977a5baeeae611a0524452c1d5168e07a564b898aa33d4db6cf9f94615893144a07957532062d70b50f891ca7ce51a6
+EBUILD samba-4.8.6-r2.ebuild 8457 BLAKE2B 84de103fe88ff1531e00454dc52ed2926afdd26437b7c9fa41e510745fa9caca5ce5beed872253c85882a58e6afc23450f9636bdaa494eb30536d9cb179bb334 SHA512 11c430743cae7775a8a882810ad71fa4a2451e1634cf185715170473dbefe26b7489ad97f72f961eed896fb0a58b6a3d0a7b783880958edcd9fa874353e0d014
EBUILD samba-4.9.1.ebuild 8489 BLAKE2B 597bb03e025bd209f80717b558d66c2ec53ad83508cb1f1b8ad79f84614b25f339d112bd4b015b439759e2e150a4feda3f751ab26d4103825134be38a2b6ed3a SHA512 d969ba1ec0b4f5b830fb57a9a44cbe870fcaba080c5df5d9be505b39298b348036e02af12e0fdb9e3ad127712ed779fc9b9aceb5f6912c22c227fa68c681d56e
+EBUILD samba-4.9.2-r1.ebuild 8553 BLAKE2B 84cd6fa168d130645df1778835ac2d980de1d0d15b3fcd6cbf9136c1f2da42a5ab11993db09d8f5418bff8d5eecb9699df2a0173da3a35fdfa11d4c519c88d8f SHA512 b2d06b108d3bd4886e0a47bec8e3185b4cf03022a7057aae2ecc84c1be2b07412c4523d5b3735a9e0612c2efc139031b8a5d13509ade8bac2f89a1efc3640b8b
MISC metadata.xml 1673 BLAKE2B 56bdd566235a3db45ebcbb546a11c12b035b41f54bd00df2fbb65f47ff29c7a2ab5466cdaff8fef6fd72a7b5fc9af2bac1e4050bfd6db3220c32ac383eeeeb1a SHA512 2436c4c24de5cebee90c6fb49d52dd9228a3f0deced53701d229f1afa3bb7eb29621864678325381dfacd1d221142368b27d4800ebd2412b18595ab106ddff01
diff --git a/net-fs/samba/files/samba-4.8.6-no-pydsdb-when-no-addc.patch b/net-fs/samba/files/samba-4.8.6-no-pydsdb-when-no-addc.patch
new file mode 100644
index 000000000000..1093b1de71df
--- /dev/null
+++ b/net-fs/samba/files/samba-4.8.6-no-pydsdb-when-no-addc.patch
@@ -0,0 +1,36 @@
+Do not install the python DSDB modules when ADDC is disabled.
+This is a change integrated upstream in 4.9.1 (or earlier).
+
+Without this, the python dsdb_dns.so module is installed, which
+is linked to libdnsserver-common.so that is NOT installed, and so
+potential breakage ensues.
+
+--- a/source4/dsdb/wscript_build 2018-01-17 03:08:39.000000000 -0500
++++ b/source4/dsdb/wscript_build 2018-11-08 10:43:58.064486832 -0500
+@@ -63,10 +63,11 @@
+ )
+
+ bld.SAMBA_PYTHON('python_dsdb',
+ source='pydsdb.c',
+ # the dependency on dcerpc here is because gensec
+ # depends on dcerpc but the waf circular dependency finder
+ # removes it so we end up with unresolved symbols.
+ deps='samdb pyldb-util dcerpc com_err pyrpc_util pyparam_util dsdb_garbage_collect_tombstones',
+- realname='samba/dsdb.so'
++ realname='samba/dsdb.so',
++ enabled=bld.AD_DC_BUILD_IS_ENABLED()
+ )
+--- a/source4/dns_server/wscript_build 2018-11-08 11:49:03.450296286 -0500
++++ b/source4/dns_server/wscript_build 2018-11-08 11:49:23.327864408 -0500
+@@ -64,9 +64,10 @@
+ private_library=True,
+ deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
+ enabled=bld.AD_DC_BUILD_IS_ENABLED())
+
+
+ bld.SAMBA_PYTHON('python_dsdb_dns',
+ source='pydns.c',
+ deps='samdb pyldb-util pyrpc_util dnsserver_common pytalloc-util',
+- realname='samba/dsdb_dns.so')
++ realname='samba/dsdb_dns.so',
++ enabled=bld.AD_DC_BUILD_IS_ENABLED())
diff --git a/net-fs/samba/files/samba-4.9.2-timespec.patch b/net-fs/samba/files/samba-4.9.2-timespec.patch
new file mode 100644
index 000000000000..c82f4af4e7ea
--- /dev/null
+++ b/net-fs/samba/files/samba-4.9.2-timespec.patch
@@ -0,0 +1,21 @@
+From 11e8c14b78e2423041f3846882f74cd6490a3e44 Mon Sep 17 00:00:00 2001
+From: Joan Karadimov <joan@profuzdigital.com>
+Date: Thu, 18 Oct 2018 18:16:17 +0300
+Subject: [PATCH] Fix compatibility issues with the timespec struct
+
+---
+ source3/include/libsmbclient.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
+index 5e4a1715402..6487ea7a8aa 100644
+--- a/source3/include/libsmbclient.h
++++ b/source3/include/libsmbclient.h
+@@ -78,6 +78,7 @@ extern "C" {
+ #include <sys/statvfs.h>
+ #include <stdint.h>
+ #include <fcntl.h>
++#include <time.h>
+ #include <utime.h>
+
+ #define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
diff --git a/net-fs/samba/samba-4.8.6.ebuild b/net-fs/samba/samba-4.8.6-r2.ebuild
index 5167caaa89c0..c959bbd6d78a 100644
--- a/net-fs/samba/samba-4.8.6.ebuild
+++ b/net-fs/samba/samba-4.8.6-r2.ebuild
@@ -15,7 +15,7 @@ SRC_PATH="stable"
SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
[[ ${PV} = *_rc* ]] || \
-KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 x86"
+KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ppc ppc64 x86"
DESCRIPTION="Samba Suite Version 4"
HOMEPAGE="https://www.samba.org/"
@@ -131,6 +131,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/${PN}-4.4.0-pam.patch"
"${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+ "${FILESDIR}/${PN}-4.8.6-no-pydsdb-when-no-addc.patch"
)
#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
diff --git a/net-fs/samba/samba-4.9.2-r1.ebuild b/net-fs/samba/samba-4.9.2-r1.ebuild
new file mode 100644
index 000000000000..6ce5625ef29b
--- /dev/null
+++ b/net-fs/samba/samba-4.9.2-r1.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="https://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint json ldap
+pam python quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
+ net-libs/libnsl:=[${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.4.3[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ <sys-libs/ldb-1.5.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.37[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? (
+ net-dns/bind-tools[gssapi]
+ dev-python/dnspython:=[${PYTHON_USEDEP}]
+ )
+ ceph? ( sys-cluster/ceph )
+ cluster? (
+ net-libs/rpcsvc-proto
+ !dev-db/ctdb
+ )
+ cups? ( net-print/cups )
+ debug? ( dev-util/lttng-ust )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ json? ( dev-libs/jansson )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )
+"
+DEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ net-libs/libtirpc[${MULTILIB_USEDEP}]
+ virtual/pkgconfig
+ || (
+ net-libs/rpcsvc-proto
+ <sys-libs/glibc-2.26[rpc(+)]
+ )
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ python? ( ${PYTHON_DEPS} )
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="
+ addc? ( python gnutls json winbind )
+ addns? ( python )
+ ads? ( acl gnutls ldap winbind )
+ cluster? ( ads )
+ gpg? ( addc )
+ test? ( python )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}
+"
+
+# the test suite is messed, it uses system-installed samba
+# bits instead of what was built, tests things disabled via use
+# flags, and generally just fails to work in a way ebuilds could
+# rely on in its current state
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+ "${FILESDIR}/${PN}-4.9.2-timespec.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # un-bundle dnspython
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
+
+ # unbundle iso8601 unless tests are enabled
+ if ! use test ; then
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
+ fi
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ $(multilib_native_use_with acl acl-support)
+ $(multilib_native_usex addc '' '--without-ad-dc')
+ $(multilib_native_use_with addns dnsupdate)
+ $(multilib_native_use_with ads)
+ $(multilib_native_use_enable ceph cephfs)
+ $(multilib_native_use_with cluster cluster-support)
+ $(multilib_native_use_enable cups)
+ $(multilib_native_use_with dmapi)
+ $(multilib_native_use_with fam)
+ $(multilib_native_use_with gpg gpgme)
+ $(multilib_native_use_with json json-audit)
+ $(multilib_native_use_enable iprint)
+ $(multilib_native_use_with pam)
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(multilib_native_use_with quota quotas)
+ $(multilib_native_use_with syslog)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with winbind)
+ $(multilib_native_usex python '' '--disable-python')
+ $(multilib_native_use_enable zeroconf avahi)
+ $(multilib_native_usex test '--enable-selftest' '')
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_enable gnutls)
+ $(use_with debug lttng)
+ $(use_with ldap)
+ )
+ multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
+
+ if multilib_is_native_abi ; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "https://samba.org/samba/history/${P}.html "
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
+}