actions.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from inary.actionsapi import get
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. shelltools.export("JOBS", get.makeJOBS().replace("-j", ""))
  11. MODULES = "idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,\
  12. pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,\
  13. auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
  14. def setup():
  15. inarytools.flags.add("-D_FILE_OFFSET_BITS=64", "-D_GNU_SOURCE", "-DLDAP_DEPRECATED", "-fPIC")
  16. shelltools.system("""sed -i -e '/"dns.resolver":/d' third_party/wscript""")
  17. shelltools.system("""sed -i -e '/"iso8601":/d' third_party/wscript""")
  18. shelltools.system("sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
  19. -i source4/dsdb/samdb/ldb_modules/password_hash.c ")
  20. autotools.configure("\
  21. --libdir=/usr/lib \
  22. --with-cachedir=/var/lib/samba \
  23. --with-configdir=/etc/samba \
  24. --with-lockdir=/var/cache/samba \
  25. --with-logfilebase=/var/log/samba \
  26. --with-modulesdir=/usr/lib/samba \
  27. --with-pammodulesdir=/lib/security \
  28. --with-piddir=/run/samba \
  29. --with-privatedir=/var/lib/samba/private \
  30. --with-sockets-dir=/run/samba \
  31. --disable-rpath \
  32. --disable-rpath-install \
  33. --enable-fhs \
  34. --nopyc \
  35. --nopyo \
  36. --with-acl-support \
  37. --with-ads \
  38. --with-automount \
  39. --with-cluster-support \
  40. --with-dnsupdate \
  41. --with-pam \
  42. --with-quotas \
  43. --with-sendfile-support \
  44. --with-shared-modules=%s \
  45. --with-syslog \
  46. --with-utmp \
  47. --with-winbind \
  48. --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt \
  49. " % MODULES)
  50. # !ldb,!pyldb-util
  51. def build():
  52. shelltools.system("make")
  53. def install():
  54. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  55. inarytools.dosym("samba-4.0/libsmbclient.h", "/usr/include/libsmbclient.h")
  56. inarytools.insinto("/etc/openldap/", "examples/LDAP/samba.schema", "samba")
  57. inarytools.insinto("/etc/samba", "examples/smb.conf.default")