You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.6 KiB
81 lines
2.6 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../samba/samba.conf |
|
# Copyright (C) 2006 - 2011 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 |
|
|
|
var_append extraconfopt " " "--with-smbmount --with-cifsmount --with-automount \ |
|
--with-syslog --with-configdir=$sysconfdir \ |
|
--with-privatedir=$sysconfdir/private --with-codepagedir=$sysconfdir/codepages \ |
|
--with-swatdir=$datadir/swat --with-quotas \ |
|
--with-acl-support --with-libsmbclient" |
|
|
|
#FIXME hack to honor lib64 :-( |
|
var_append confopt ' ' "--with-libdir=$root/$prefix/${libdir##*/}" |
|
|
|
|
|
# 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-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 )\"" |
|
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 |
|
|
|
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/"
|
|
|