1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/samba/samba.conf
3 # Copyright (C) 2004 - 2024 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 if [ $prefix_auto = 1 ]; then
14 if [ "$SDECFG_PKG_SAMBA_CORE_PREFIX" ]; then
15 prefix="$SDECFG_PKG_SAMBA_CORE_PREFIX"
21 [ "${prefix#opt/}" == "$prefix" ] && sysconfdir="$sysconfdir/samba"
24 var_remove confopt ' ' '--disable-debug'
25 var_remove_regex confopt ' ' '--with-sysroot=.*'
26 var_remove_regex confopt ' ' '--host=.*'
27 var_remove_regex confopt ' ' '--build=.*'
30 var_append extraconfopt " " "--with-automount \
31 --with-syslog --with-configdir=$sysconfdir \
32 --with-privatedir=$sysconfdir/private \
35 if atstage cross; then
36 var_append confopt ' ' '--disable-python'
39 pkginstalled pam && atstage native && var_append extraconfopt ' ' "--with-pam" # --with-pam_smbpass"
40 pkginstalled jansson || var_append extraconfopt ' ' '--without-json'
41 pkginstalled libarchive || var_append extraconfopt ' ' '--without-libarchive'
42 pkginstalled acl && var_append confopt ' ' '--with-acl-support' || var_append confopt ' ' '--without-acl-support'
43 pkginstalled cups || var_append extraconfopt ' ' '--disable-cups'
45 #var_append extraconfopt ' ' "--with-nisplus-home"
47 # let samba configure find ldap and enable ldapsam
48 if pkginstalled openldap; then
50 var_append extraconfopt ' ' "--with-ldapsam"
51 var_append extraconfopt ' ' "CFLAGS=\"$CFLAGS${CFLAGS:+ }-I$(pkgprefix includedir openldap)\""
52 var_append extraconfopt ' ' "CPPFLAGS=\"$CPPFLAGS${CPPFLAGS:+ }-I$(pkgprefix includedir openldap)\""
53 var_append extraconfopt ' ' "LDFLAGS=\"$LDFLAGS${LDFLAGS:+ }-L$(pkgprefix libdir openldap)\""
55 var_append extraconfopt ' ' '--without-ldap --without-ads --without-ad-dc'
59 # FIXME: this should be down with pkgprefix libdir cups
60 [ -d $root/usr/lib/cups/backend/ ] &&
61 ln -sf $bindir/smbspool $root/usr/lib/cups/backend/smb
63 chmod 755 smbadduser; cp -vf smbadduser $root$bindir/
66 sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
67 examples/smb.conf.default > $root$docdir/smb.conf
69 cat > $root$sysconfdir/lmhosts <<'EOS'
72 # This file contains host maps for NetBIOS
73 # It is similar to the /etc/hosts file format
74 # See lmhosts (5) for more info.
77 # 0.0.0.0 NetBIOS_Name
81 # xinetd integration readme
82 sed "s,D_sbindir,$sbindir," < $confdir/README.xinetd > $root$docdir/README.xinetd
84 #hook_add postmake 3 "samba_pm"
87 hook_add postmake 5 "cp -vRf examples $root$docdir/"