actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.unlink('pwd.lock')
  12. pisitools.dosed("configure.ac", "-Werror")
  13. pisitools.dosed("Makefile.am", "-Werror")
  14. autotools.autoreconf("-vfi")
  15. autotools.configure("--enable-sqlite \
  16. --enable-pie \
  17. --disable-docs \
  18. --disable-static \
  19. --disable-publican \
  20. --disable-crash \
  21. --disable-silent-rules \
  22. --without-systemd \
  23. --docdir=/%s/%s \
  24. --without-rpm" % (get.docDIR(), get.srcNAME()))
  25. def build():
  26. autotools.make()
  27. def install():
  28. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  29. pisitools.dodir("/var/cache/systemtap")
  30. pisitools.dodir("/run/systemtap")
  31. pisitools.dodir("/var/log/stap-server")
  32. pisitools.dodir("/etc/logrotate.d")
  33. pisitools.dodir("/etc/stap-server/conf.d")
  34. pisitools.dodir("/etc/systemtap/conf.d")
  35. pisitools.dodir("/etc/systemtap/script.d")
  36. pisitools.dobin("stap-prep")
  37. pisitools.domove("/var/run/stap-server", "/run/")
  38. pisitools.removeDir("var/run")
  39. pisitools.removeDir("/usr/lib/systemd")
  40. shelltools.copytree("testsuite", "%s/usr/share/systemtap" % get.installDIR())
  41. pisitools.insinto("/etc/logrotate.d", "initscript/logrotate.stap-server", "stap-server")
  42. pisitools.insinto("/etc/conf.d", "initscript/config.stap-server", "stap-server")
  43. pisitools.insinto("/etc/systemtap", "initscript/config.systemtap", "config")
  44. # Clean uprobes directory
  45. #autotools.make("-C %s/usr/share/systemtap/runtime/uprobes clean" % get.installDIR())
  46. pisitools.dodoc("COPYING", "HACKING", "INTERNALS", "README.*")