OpenSDE Packages Database (without history before r20070)
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.

93 lines
2.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../samba/samba.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if [ $prefix_auto = 1 ] ; then
  17. prefix="opt/samba"
  18. set_confopt
  19. fi
  20. var_append extraconfopt " " "--with-smbmount --with-automount \
  21. --with-syslog --with-configdir=$sysconfdir \
  22. --with-privatedir=$sysconfdir/private --with-codepagedir=$sysconfdir/codepages \
  23. --with-swatdir=$datadir/swat --with-quotas \
  24. --with-acl-support --with-libsmbclient"
  25. #FIXME hack to honor lib64 :-(
  26. var_append confopt ' ' "--with-libdir=$root/$prefix/${libdir##*/}"
  27. #FIXME: temporarily disable spinlocks because it fails to build (3.0.23+)
  28. #case $arch in
  29. # x86|sparc|powerpc) var_append extraconfopt ' ' '--with-spinlocks' ;;
  30. # *)
  31. var_append extraconfopt ' ' '--without-spinlocks'
  32. # ;;
  33. #esac
  34. # pam support
  35. pkginstalled pam && var_append extraconfopt ' ' "--with-pam --with-pam_smbpass"
  36. # enable nis+ support
  37. var_append extraconfopt ' ' "--with-nisplus-home"
  38. # let samba configure find ldap and enable ldapsam
  39. if pkginstalled openldap; then
  40. pkgprefix -t openldap
  41. var_append extraconfopt ' ' "--with-ldapsam"
  42. var_append extraconfopt ' ' "CFLAGS=\"$CFLAGS${CFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  43. var_append extraconfopt ' ' "CPPFLAGS=\"$CPPFLAGS${CPPFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  44. var_append extraconfopt ' ' "LDFLAGS=\"$LDFLAGS${LDFLAGS:+ }-L$( pkgprefix libdir openldap )\""
  45. fi
  46. samba_pm ()
  47. {
  48. # build and install the cifs mount/umount helper
  49. $CC client/mount.cifs.c -o mount.cifs
  50. $CC client/umount.cifs.c -o umount.cifs
  51. install mount.cifs umount.cifs $root/sbin/
  52. # FIXME: this should be down with pkgprefix libdir cups
  53. [ -d $root/usr/lib/cups/backend/ ] && \
  54. ln -sf $bindir/smbspool $root/usr/lib/cups/backend/smb
  55. cp -vf smbadduser $bindir ; chmod 755 $bindir/smbadduser
  56. cd ..
  57. sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
  58. examples/smb.conf.default > $docdir/smb.conf
  59. cat > $sysconfdir/lmhosts <<'EOS'
  60. # T2: Samba lmhosts
  61. #
  62. # This file contains host maps for NetBIOS
  63. # It is similar to the /etc/hosts file format
  64. # See lmhosts (5) for more info.
  65. #
  66. # Format is:
  67. # 0.0.0.0 NetBIOS_Name
  68. EOS
  69. # xinetd integration readme
  70. sed "s,D_sbindir,$sbindir," < $confdir/README.xinetd > $docdir/README.xinetd
  71. }
  72. srcdir="samba-$ver/source"
  73. hook_add premake 5 "$MAKE proto_exists" # for parallel make
  74. hook_add postmake 3 "samba_pm"
  75. # install examples
  76. hook_add postmake 5 "cp -vRf examples $docdir/"