# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/samba/samba.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- if [ $prefix_auto = 1 ]; then if [ "$SDECFG_PKG_SAMBA_CORE_PREFIX" ]; then prefix="$SDECFG_PKG_SAMBA_CORE_PREFIX" else prefix="opt/samba" fi set_confopt fi [ "${prefix#opt/}" == "$prefix" ] && sysconfdir="$sysconfdir/samba" cleanconfopt=0 var_remove confopt ' ' '--disable-debug' var_remove_regex confopt ' ' '--with-sysroot=.*' var_remove_regex confopt ' ' '--host=.*' var_remove_regex confopt ' ' '--build=.*' extraconfopt='' var_append extraconfopt " " "--with-automount \ --with-syslog --with-configdir=$sysconfdir \ --with-privatedir=$sysconfdir/private \ --with-quotas" if atstage cross; then var_append confopt ' ' '--disable-python' fi pkginstalled pam && atstage native && var_append extraconfopt ' ' "--with-pam" # --with-pam_smbpass" pkginstalled jansson || var_append extraconfopt ' ' '--without-json' pkginstalled libarchive || var_append extraconfopt ' ' '--without-libarchive' pkginstalled acl && var_append confopt ' ' '--with-acl-support' || var_append confopt ' ' '--without-acl-support' pkginstalled cups || var_append extraconfopt ' ' '--disable-cups' #var_append extraconfopt ' ' "--with-nisplus-home" # let samba configure find ldap and enable ldapsam if pkginstalled openldapX; then pkgprefix -t openldap var_append extraconfopt ' ' "--with-ldapsam" var_append extraconfopt ' ' "CFLAGS=\"$CFLAGS${CFLAGS:+ }-I$(pkgprefix includedir openldap)\"" var_append extraconfopt ' ' "CPPFLAGS=\"$CPPFLAGS${CPPFLAGS:+ }-I$(pkgprefix includedir openldap)\"" var_append extraconfopt ' ' "LDFLAGS=\"$LDFLAGS${LDFLAGS:+ }-L$(pkgprefix libdir openldap)\"" else var_append extraconfopt ' ' '--without-ldap --without-ads --without-ad-dc' fi samba_pm() { # FIXME: this should be down with pkgprefix libdir cups [ -d $root/usr/lib/cups/backend/ ] && ln -sf $bindir/smbspool $root/usr/lib/cups/backend/smb chmod 755 smbadduser; cp -vf smbadduser $root$bindir/ cd .. sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \ examples/smb.conf.default > $root$docdir/smb.conf cat > $root$sysconfdir/lmhosts <<'EOS' # T2: Samba lmhosts # # This file contains host maps for NetBIOS # It is similar to the /etc/hosts file format # See lmhosts (5) for more info. # # Format is: # 0.0.0.0 NetBIOS_Name EOS # xinetd integration readme sed "s,D_sbindir,$sbindir," < $confdir/README.xinetd > $root$docdir/README.xinetd } #hook_add postmake 3 "samba_pm" # install examples hook_add postmake 5 "cp -vRf examples $root$docdir/"