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.

90 lines
2.8 KiB

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