|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../samba/samba.conf
|
|
|
|
# Copyright (C) 2006 - 2014 The OpenSDE Project
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
# Copyright (C) 1998 - 2003 Clifford Wolf
|
|
|
|
#
|
|
|
|
# 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 as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
if [ $prefix_auto = 1 ] ; then
|
|
|
|
# use a dedicated sysconfdir instead of installing into /etc
|
|
|
|
sysconfdir="$sysconfdir/$pkg"
|
|
|
|
# use a dedicated datadir
|
|
|
|
datadir="$datadir/$pkg"
|
|
|
|
# set 'rootsbindir' to get mount.cifs installed into /sbin
|
|
|
|
var_append extraconfopt ' ' "--with-rootsbindir=/sbin"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set sysconfdir to '/etc/samba' in the case it was autoconfigured to '/etc'
|
|
|
|
[ "$sysconfdir" = "$root/etc" ] && \
|
|
|
|
sysconfdir=$root/etc/samba
|
|
|
|
|
|
|
|
if pkginstalled -f fhs; then
|
|
|
|
var_append extraconfopt ' ' "--with-fhs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# location of configuration files
|
|
|
|
var_append extraconfopt ' ' "--with-configdir=$sysconfdir"
|
|
|
|
|
|
|
|
# location for smbpasswd, secrets.tdb, and related files for authentication
|
|
|
|
var_append extraconfopt ' ' "--with-privatedir=$sysconfdir/private"
|
|
|
|
|
|
|
|
# location of codepage files
|
|
|
|
var_append extraconfopt ' ' "--with-codepagedir=$sysconfdir/codepages"
|
|
|
|
|
|
|
|
# location for browse lists, WINS data, and PID files
|
|
|
|
var_append extraconfopt ' ' "--with-piddir=$localstatedir/run/$pkg"
|
|
|
|
|
|
|
|
# always build/install the smbclient library
|
|
|
|
var_append extraconfopt ' ' "--with-libsmbclient"
|
|
|
|
|
|
|
|
# Windows NT/2000/XP ACL support (needs POSIX ACL support on the host)
|
|
|
|
if pkginstalled -f acl; then
|
|
|
|
var_append extraconfopt ' ' "--with-acl-support"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# support for the automounter
|
|
|
|
var_append extraconfopt ' ' "--with-automount"
|
|
|
|
|
|
|
|
# syslog error logging support
|
|
|
|
var_append extraconfopt ' ' "--with-syslog"
|
|
|
|
|
|
|
|
# disk-quota support (classified as an experimental option)
|
|
|
|
var_append extraconfopt ' ' "--with-quotas"
|
|
|
|
|
|
|
|
# install location of the Samba Web Administration Tool (SWAT)
|
|
|
|
var_append extraconfopt ' ' "--with-swatdir=$datadir/swat"
|
|
|
|
|
|
|
|
# enable nis+ support
|
|
|
|
var_append extraconfopt ' ' "--with-nisplus-home"
|
|
|
|
|
|
|
|
# let samba configure find ldap and enable ldapsam
|
|
|
|
if pkginstalled openldap; then
|
|
|
|
pkgprefix -t openldap
|
|
|
|
var_append extraconfopt ' ' "--with-ldap"
|
|
|
|
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 )\""
|
|
|
|
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
|
|
|
|
|
|
|
|
cp -vf smbadduser $bindir ; chmod 755 $bindir/smbadduser
|
|
|
|
|
|
|
|
# install pkg-config files
|
|
|
|
install -m 644 pkgconfig/*.pc $root$libdir/pkgconfig
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
|
|
|
|
examples/smb.conf.default > $docdir/smb.conf
|
|
|
|
|
|
|
|
cat > $sysconfdir/lmhosts <<'EOS'
|
|
|
|
# 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 > $docdir/README.xinetd
|
|
|
|
}
|
|
|
|
|
|
|
|
srcdir="samba-$ver/source3"
|
|
|
|
|
|
|
|
hook_add postmake 3 "samba_pm"
|
|
|
|
|
|
|
|
# install examples
|
|
|
|
hook_add postmake 5 "cp -vRf examples $docdir/"
|