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.

90 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. if ! [ "$arch" = x86 -a "$ROCKCFG_X86_BITS" = "64" ] ; then
  33. var_append extraconfopt ' ' "--with-spinlocks"
  34. fi
  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. var_append extraconfopt ' ' "--with-ldapsam"
  42. var_append CFLAGS " " "-I$root/$pkg_openldap_prefix/include"
  43. var_append CPPFLAGS " " "-I$root/$pkg_openldap_prefix/include"
  44. var_append LDFLAGS " " "-L$root/$pkg_openldap_prefix/lib"
  45. fi
  46. samba_pm ()
  47. {
  48. install_init samba $confdir/samba.init
  49. install_init smbmount $confdir/smbmount.init
  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. mkdir -p $docdir
  55. sed 's/; encrypt passwords = yes/ encrypt passwords = yes/' \
  56. examples/smb.conf.default > $docdir/smb.conf
  57. # kdenetwork searches for smb.conf at build time and uses its location
  58. # as a runtime search path.
  59. cp -a $docdir/smb.conf $sysconfdir/
  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/'