summaryrefslogtreecommitdiff
path: root/main/samba
diff options
context:
space:
mode:
Diffstat (limited to 'main/samba')
-rw-r--r--main/samba/APKBUILD90
1 files changed, 77 insertions, 13 deletions
diff --git a/main/samba/APKBUILD b/main/samba/APKBUILD
index 0ba6bbb3012..6c2f37b8bc7 100644
--- a/main/samba/APKBUILD
+++ b/main/samba/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=samba
pkgver=4.4.5
-pkgrel=0
+pkgrel=1
pkgdesc="Tools to access a server's filespace and printers via SMB"
url="http://www.samba.org"
arch="all"
@@ -22,6 +22,10 @@ subpackages="$pkgname-dev $pkgname-doc
$pkgname-winbind-krb5-locator:_winbind_krb5_locator
$pkgname-libnss-winbind:_libnss_winbind
+ $pkgname-heimdal-libs:_heimdal_libs
+ $pkgname-dc
+ $pkgname-dc-libs:_dc_libs
+
$pkgname-server
$pkgname-server-libs:_server_libs
$pkgname-pidl
@@ -35,7 +39,7 @@ depends="$pkgname-server=$pkgver-r$pkgrel
$pkgname-common-tools=$pkgver-r$pkgrel"
# note that heimdal is required (over mit krb5) for AD DC functionality
-makedepends="popt-dev ncurses-dev openldap-dev e2fsprogs-dev krb5-dev
+makedepends="popt-dev ncurses-dev openldap-dev e2fsprogs-dev
talloc-dev tdb-dev py-tdb ldb-dev cups-dev python-dev libcap-dev
tevent-dev py-tevent iniparser-dev perl subunit-dev docbook-xsl
libarchive-dev"
@@ -63,6 +67,10 @@ prepare() {
build() {
cd "$_builddir"
local _jobs=$JOBS
+ local _idmap_modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2
+ local _pdb_modules=pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
+ local _auth_modules=auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
+
if [ -z "$_jobs" ]; then
_jobs=$(awk '/^core id/ {n++} END{print n}' /proc/cpuinfo)
fi
@@ -78,11 +86,10 @@ build() {
--without-pam \
--without-systemd \
--with-ads \
- --with-system-mitkrb5 \
- --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4 \
+ --with-shared-modules=$_idmap_modules,$_pdb_modules,$_auth_modules \
--enable-cups \
--without-gettext \
- --bundled-libraries=NONE,ntdb \
+ --bundled-libraries=NONE,ntdb,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc \
--disable-rpath-install \
|| return 1
make || return 1
@@ -101,9 +108,6 @@ package() {
install -m 0744 packaging/printing/smbprint "$pkgdir"/usr/bin/smbprint \
|| return 1
install -Dm644 "$srcdir"/samba.logrotate "$pkgdir"/etc/logrotate.d/samba
-
- # needed only by DC
- rm -r "$pkgdir"/usr/lib/samba/ldb
}
initscript() {
@@ -172,6 +176,7 @@ _common_server_libs() {
usr/lib/libsmbldap.so.* \
usr/lib/samba/libads-samba4.so \
usr/lib/samba/libauth-samba4.so \
+ usr/lib/samba/libdfs-server-ad-samba4.so \
usr/lib/samba/libnpa-tstream-samba4.so \
usr/lib/samba/libprinting-migrate-samba4.so \
usr/lib/samba/libsmbd-base-samba4.so \
@@ -265,7 +270,6 @@ _server_libs() {
usr/lib/samba/libidmap-samba4.so \
usr/lib/samba/libnss-info-samba4.so \
\
- usr/lib/samba/libxattr-tdb-samba4.so \
usr/lib/samba/libnon-posix-acls-samba4.so \
|| return 1
}
@@ -326,6 +330,68 @@ _winbind_krb5_locator() {
|| return 1
}
+dc() {
+ pkgdesc="Samba AD Domain Controller"
+ depends="$pkgname-common=$pkgver-r$pkgrel
+ $pkgname-server=$pkgver-r$pkgrel
+ $pkgname-winbind=$pkgver-r$pkgrel
+ py-$pkgname=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ _mv_files \
+ usr/bin/samba-tool \
+ usr/sbin/samba* \
+ usr/share/samba \
+ usr/lib/samba/auth/samba4.so \
+ usr/lib/samba/gensec \
+ usr/lib/samba/ldb \
+ usr/lib/samba/libsmbpasswdparser-samba4.so \
+ usr/lib/samba/vfs/posix_eadb.so
+}
+
+_dc_libs() {
+ pkgdesc="Samba AD Domain Controller libraries"
+ cd "$pkgdir"
+ _mv_files \
+ usr/lib/libdcerpc-samr.so.* \
+ usr/lib/libdcerpc-server.so.* \
+ usr/lib/libsamba-policy.so.* \
+ usr/lib/samba/bind9 \
+ usr/lib/samba/libHDB-SAMBA4-samba4.so \
+ usr/lib/samba/libLIBWBCLIENT-OLD-samba4.so \
+ usr/lib/samba/libauth-unix-token-samba4.so \
+ usr/lib/samba/libauth4-samba4.so \
+ usr/lib/samba/libcluster-samba4.so \
+ usr/lib/samba/libdb-glue-samba4.so \
+ usr/lib/samba/libdnsserver-common-samba4.so \
+ usr/lib/samba/libdsdb-module-samba4.so \
+ usr/lib/samba/libhdb-samba4.so.* \
+ usr/lib/samba/libkdc-samba4.so.* \
+ usr/lib/samba/libntvfs-samba4.so \
+ usr/lib/samba/libpac-samba4.so \
+ usr/lib/samba/libposix-eadb-samba4.so \
+ usr/lib/samba/libprocess-model-samba4.so \
+ usr/lib/samba/libservice-samba4.so \
+ usr/lib/samba/libshares-samba4.so \
+ usr/lib/samba/process_model \
+ usr/lib/samba/service
+}
+
+_heimdal_libs() {
+ pkgdesc="Samba heimdal libraries"
+ depends=
+ cd "$pkgdir"
+ _mv_files \
+ usr/lib/samba/libasn1-samba4.so.* \
+ usr/lib/samba/libgssapi-samba4.so.* \
+ usr/lib/samba/libhcrypto-samba4.so.* \
+ usr/lib/samba/libheimbase-samba4.so.* \
+ usr/lib/samba/libheimntlm-samba4.so.* \
+ usr/lib/samba/libhx509-samba4.so.* \
+ usr/lib/samba/libkrb5-samba4.so.* \
+ usr/lib/samba/libroken-samba4.so.* \
+ usr/lib/samba/libwind-samba4.so.*
+}
+
server() {
pkgdesc="Samba server"
depends="$pkgname-common=$pkgver-r$pkgrel
@@ -338,6 +404,7 @@ server() {
usr/bin/smbstatus \
\
usr/lib/samba/auth \
+ usr/lib/samba/libxattr-tdb-samba4.so \
usr/lib/samba/vfs \
|| return 1
}
@@ -370,10 +437,7 @@ _test() {
usr/bin/masktest \
usr/bin/ndrdump \
usr/bin/smbtorture \
- usr/lib/samba/libcluster-samba4.so \
- usr/lib/samba/libdsdb-module-samba4.so \
- usr/lib/samba/libshares-samba4.so \
- usr/lib/samba/libsmbpasswdparser-samba4.so \
+ usr/lib/samba/libdlz-bind9-for-torture-samba4.so \
usr/lib/samba/libtorture-samba4.so \
|| return 1
}