actions.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. def setup():
  11. for f in ["src/Makefile.am", "src/Makefile.in", "daemon/Makefile.am", "daemon/Makefile.in"]:
  12. pisitools.dosed(f, "\$\(localstatedir\)(\/run\/libvirt)", "\\1")
  13. for f in ["daemon/libvirtd.c", "daemon/libvirtd.conf", "daemon/test_libvirtd.aug.in"]:
  14. pisitools.dosed(f, "\/var(\/run\/libvirt)", "\\1")
  15. for f in ["src/locking/virtlockd.pod", "src/virtlockd.8.in", "daemon/libvirtd.8.in", "daemon/libvirtd.pod", ]:
  16. pisitools.dosed(f, "LOCALSTATEDIR(\/run\/libvirt)", "\\1")
  17. autotools.configure("--with-init-script=none \
  18. --with-remote-pid-file=/run/libvirtd.pid \
  19. --with-qemu-user=qemu \
  20. --with-qemu-group=qemu \
  21. --with-lxc \
  22. --with-udev \
  23. --with-qemu \
  24. --with-sasl \
  25. --with-audit \
  26. --with-numactl \
  27. --with-yajl \
  28. --with-avahi \
  29. --with-netcf \
  30. --with-libssh2=/usr/lib \
  31. --with-capng \
  32. --with-polkit \
  33. --with-python \
  34. --with-network \
  35. --with-libvirtd \
  36. --with-storage-fs \
  37. --with-storage-scsi \
  38. --with-storage-mpath \
  39. --with-storage-disk \
  40. --with-storage-lvm \
  41. --without-vbox \
  42. --without-vmware \
  43. --without-esx \
  44. --without-storage-iscsi \
  45. --without-hal \
  46. --without-xen \
  47. --without-phyp \
  48. --without-uml \
  49. --without-openvz \
  50. --without-selinux \
  51. --without-apparmor \
  52. --disable-static")
  53. def build():
  54. autotools.make()
  55. #def check():
  56. # for v in ["XDG_HOME", "XDG_CACHE_HOME", "XDG_CONFIG_HOME"]:
  57. # shelltools.export(v, get.workDIR())
  58. # autotools.make("check")
  59. def install():
  60. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  61. pisitools.removeDir("/usr/share/gtk-doc")
  62. pisitools.dodoc("AUTHORS", "NEWS", "README*", "ChangeLog")