mirror of the now-defunct rocklinux.org
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.

92 lines
2.9 KiB

  1. #!/bin/bash
  2. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  3. #
  4. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  5. # Please add additional copyright information _after_ the line containing
  6. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  7. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  8. #
  9. # ROCK Linux: rock-src/package/sirkull/samba/samba.conf
  10. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  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; either version 2 of the License, or
  15. # (at your option) any later version. A copy of the GNU General Public
  16. # License can be found at Documentation/COPYING.
  17. #
  18. # Many people helped and are helping developing ROCK Linux. Please
  19. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  20. # file for details.
  21. #
  22. # --- ROCK-COPYRIGHT-NOTE-END ---
  23. if [ $prefix_auto = 1 ] ; then
  24. prefix="opt/samba"
  25. set_confopt
  26. fi
  27. var_append extraconfopt " " "--with-smbmount --with-automount \
  28. --with-syslog --with-configdir=$sysconfdir \
  29. --with-privatedir=$sysconfdir/private --with-codepagedir=$sysconfdir/codepages \
  30. --with-swatdir=$root/$prefix/share/swat --with-quotas --with-fhs \
  31. --with-acl-support --with-libsmbclient"
  32. var_append makeopt " " "LIBDIR=$root/$prefix/lib"
  33. var_append makeinstopt " " "LIBDIR=$root/$prefix/lib"
  34. var_append makeopt " " "LIBDIR=$root/$prefix/lib"
  35. var_append makeinstopt " " "LIBDIR=$root/$prefix/lib"
  36. if ! [ "$arch" = x86 -a "$ROCKCFG_X86_BITS" = "64" ] ; then
  37. var_append extraconfopt ' ' "--with-spinlocks"
  38. fi
  39. # pam support
  40. pkginstalled pam && var_append extraconfopt ' ' "--with-pam --with-pam_smbpass"
  41. # enable nis+ support
  42. var_append extraconfopt ' ' "--with-nisplus-home"
  43. # let samba configure find ldap and enable ldapsam
  44. if pkginstalled openldap; then
  45. var_append extraconfopt ' ' "--with-ldapsam"
  46. var_append CFLAGS " " "-I$root/$pkg_openldap_prefix/include"
  47. var_append CPPFLAGS " " "-I$root/$pkg_openldap_prefix/include"
  48. var_append extraconfopt " " "-L$root/$pkg_openldap_prefix/lib"
  49. fi
  50. samba_pm ()
  51. {
  52. install_init samba $confdir/samba.init
  53. install_init smbmount $confdir/smbmount.init
  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. # ROCK Linux: 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. }
  71. srcdir="samba-$ver/source"
  72. hook_add postmake 3 "samba_pm"
  73. hook_add postmake 3 "echo \"pkg_samba_prefix=$prefix\" \
  74. > $root/var/adm/parse-config/samba"
  75. # these html files shouldn't go to :dev
  76. splitreg 90 . '/share/swat/include/'