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.

94 lines
2.9 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 - 2007 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. #FIXME: temporarily disable spinlocks because it fails to build (3.0.23+)
  29. #case $arch in
  30. # x86|sparc|powerpc) var_append extraconfopt ' ' '--with-spinlocks' ;;
  31. # *)
  32. var_append extraconfopt ' ' '--without-spinlocks'
  33. # ;;
  34. #esac
  35. # pam support
  36. pkginstalled pam && var_append extraconfopt ' ' "--with-pam --with-pam_smbpass"
  37. # enable nis+ support
  38. var_append extraconfopt ' ' "--with-nisplus-home"
  39. # let samba configure find ldap and enable ldapsam
  40. if pkginstalled openldap; then
  41. pkgprefix -t openldap
  42. var_append extraconfopt ' ' "--with-ldapsam"
  43. var_append extraconfopt ' ' "CFLAGS=\"$CFLAGS${CFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  44. var_append extraconfopt ' ' "CPPFLAGS=\"$CPPFLAGS${CPPFLAGS:+ }-I$( pkgprefix includedir openldap )\""
  45. var_append extraconfopt ' ' "LDFLAGS=\"$LDFLAGS${LDFLAGS:+ }-L$( pkgprefix libdir openldap )\""
  46. fi
  47. samba_pm ()
  48. {
  49. # build and install the cifs mount/umount helper
  50. $CC client/mount.cifs.c -o mount.cifs
  51. $CC client/umount.cifs.c -o umount.cifs
  52. install mount.cifs umount.cifs $root/sbin/
  53. # FIXME: this should be down with pkgprefix libdir cups
  54. [ -d $root/usr/lib/cups/backend/ ] && \
  55. ln -sf $bindir/smbspool $root/usr/lib/cups/backend/smb
  56. cp -vf smbadduser $bindir ; chmod 755 $bindir/smbadduser
  57. cd ..
  58. sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
  59. examples/smb.conf.default > $docdir/smb.conf
  60. cat > $sysconfdir/lmhosts <<'EOS'
  61. # T2: Samba lmhosts
  62. #
  63. # This file contains host maps for NetBIOS
  64. # It is similar to the /etc/hosts file format
  65. # See lmhosts (5) for more info.
  66. #
  67. # Format is:
  68. # 0.0.0.0 NetBIOS_Name
  69. EOS
  70. # xinetd integration readme
  71. sed "s,D_sbindir,$sbindir," < $confdir/README.xinetd > $docdir/README.xinetd
  72. }
  73. srcdir="samba-$ver/source"
  74. hook_add premake 5 "$MAKE proto_exists" # for parallel make
  75. hook_add postmake 3 "samba_pm"
  76. # install examples
  77. hook_add postmake 5 "cp -vRf examples $docdir/"