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.

77 lines
2.4 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 - 2009 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-cifsmount --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. # enable nis+ support
  28. var_append extraconfopt ' ' "--with-nisplus-home"
  29. # let samba configure find ldap and enable ldapsam
  30. if pkginstalled openldap; then
  31. pkgprefix -t openldap
  32. var_append extraconfopt ' ' "--with-ldapsam"
  33. var_append extraconfopt ' ' "CFLAGS=\"$CFLAGS${CFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  34. var_append extraconfopt ' ' "CPPFLAGS=\"$CPPFLAGS${CPPFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  35. var_append extraconfopt ' ' "LDFLAGS=\"$LDFLAGS${LDFLAGS:+ }-L$( pkgprefix libdir openldap )\""
  36. fi
  37. samba_pm ()
  38. {
  39. # FIXME: this should be down with pkgprefix libdir cups
  40. [ -d $root/usr/lib/cups/backend/ ] && \
  41. ln -sf $bindir/smbspool $root/usr/lib/cups/backend/smb
  42. cp -vf smbadduser $bindir ; chmod 755 $bindir/smbadduser
  43. cd ..
  44. sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
  45. examples/smb.conf.default > $docdir/smb.conf
  46. cat > $sysconfdir/lmhosts <<'EOS'
  47. # Samba lmhosts
  48. #
  49. # This file contains host maps for NetBIOS
  50. # It is similar to the /etc/hosts file format
  51. # See lmhosts (5) for more info.
  52. #
  53. # Format is:
  54. # 0.0.0.0 NetBIOS_Name
  55. EOS
  56. # xinetd integration readme
  57. sed "s,D_sbindir,$sbindir," < $confdir/README.xinetd > $docdir/README.xinetd
  58. }
  59. srcdir="samba-$ver/source3"
  60. hook_add postmake 3 "samba_pm"
  61. # install examples
  62. hook_add postmake 5 "cp -vRf examples $docdir/"