actions.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. libdir = "lib32" if get.buildTYPE() == "emul32" else "lib"
  11. jobs = get.makeJOBS().replace("-j", "")
  12. def setup():
  13. options = "--sysconfdir=/etc/samba \
  14. --builtin-libraries=replace \
  15. --bundled-libraries=NONE \
  16. --disable-rpath \
  17. --disable-rpath-install \
  18. --disable-silent-rules \
  19. --enable-talloc-compat1"
  20. if get.buildTYPE() == "emul32":
  21. options += " --libdir=/usr/lib32 \
  22. --disable-python \
  23. "
  24. elif get.ARCH() == "x86_64":
  25. options += " "
  26. autotools.configure(options)
  27. def build():
  28. autotools.make("JOBS=%s" % jobs)
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s JOBS=%s" % (get.installDIR(), jobs))
  31. if get.buildTYPE() == "emul32":
  32. return
  33. #pisitools.removeDir("/usr/share/swig")
  34. #pisitools.remove("/usr/lib*/*.a")
  35. #pisitools.remove("/usr/lib*/libtalloc-compat1-%s.so" % get.srcVERSION())
  36. # Create symlinks for so file
  37. #pisitools.dosym("libtalloc.so.%s" % get.srcVERSION(), "/usr/%s/libtalloc.so.%s" % (libdir, get.srcVERSION().split(".")[0]))
  38. #pisitools.dosym("libtalloc.so.%s" % get.srcVERSION(), "/usr/%s/libtalloc.so" % libdir)
  39. pisitools.dodoc("NEWS")