actions.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/usr/bin/python
  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 pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.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. pisitools.flags.add("-D_FILE_OFFSET_BITS=64", "-D_GNU_SOURCE", "-DLDAP_DEPRECATED", "-fPIC")
  16. autotools.configure("\
  17. --libdir=/usr/lib \
  18. --with-cachedir=/var/lib/samba \
  19. --with-configdir=/etc/samba \
  20. --with-lockdir=/var/cache/samba \
  21. --with-logfilebase=/var/log/samba \
  22. --with-modulesdir=/usr/lib/samba \
  23. --with-pammodulesdir=/lib/security \
  24. --with-piddir=/run/samba \
  25. --with-privatedir=/var/lib/samba/private \
  26. --with-sockets-dir=/run/samba \
  27. --disable-rpath \
  28. --disable-rpath-install \
  29. --enable-fhs \
  30. --enable-gnutls \
  31. --nopyc \
  32. --nopyo \
  33. --with-acl-support \
  34. --with-ads \
  35. --with-automount \
  36. --with-cluster-support \
  37. --with-dnsupdate \
  38. --with-pam \
  39. --with-quotas \
  40. --with-sendfile-support \
  41. --with-shared-modules=%s \
  42. --with-syslog \
  43. --with-utmp \
  44. --with-winbind \
  45. --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt \
  46. " % MODULES)
  47. # !ldb,!pyldb-util
  48. def build():
  49. shelltools.system("make")
  50. def install():
  51. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  52. pisitools.dosym("samba-4.0/libsmbclient.h", "/usr/include/libsmbclient.h")
  53. # remove unneeded files
  54. pisitools.removeDir("/usr/share/ctdb")