#!/bin/sh # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../samba/samba.conf # Copyright (C) 2006 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 prefix="opt/samba" set_confopt fi var_append extraconfopt " " "--with-smbmount --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##*/}" case $arch in x86|sparc|powerpc) var_append extraconfopt ' ' '--with-spinlocks' ;; esac # pam support pkginstalled pam && var_append extraconfopt ' ' "--with-pam --with-pam_smbpass" # 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 () { # build and install the cifs mount/umount helper $CC client/mount.cifs.c -o mount.cifs $CC client/umount.cifs.c -o umount.cifs install mount.cifs umount.cifs $root/sbin/ # 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' # 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 > $docdir/README.xinetd } srcdir="samba-$ver/source" hook_add premake 5 "$MAKE proto_exists" # for parallel make hook_add postmake 3 "samba_pm" # install examples hook_add postmake 5 "cp -vRf examples $docdir/"