actions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import pythonmodules
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.export("PTHREAD_LIBS", "-lpthread")
  13. shelltools.copy("../googletest-release-1.7.0", "gtest")
  14. autotools.autoreconf("-vif")
  15. autotools.configure("--disable-static")
  16. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  17. def build():
  18. autotools.make()
  19. shelltools.cd("python")
  20. pythonmodules.compile()
  21. shelltools.cd("..")
  22. def install():
  23. autotools.install()
  24. shelltools.cd("python")
  25. pythonmodules.install()
  26. shelltools.cd("..")
  27. pisitools.insinto("/usr/share/vim/vimfiles/syntax/", "editors/proto.vim")
  28. pisitools.insinto("/usr/share/emacs/site-lisp/", "editors/protobuf-mode.el")
  29. pisitools.dodoc("CHANGES.txt", "CONTRIBUTORS.txt", "LICENSE", "README.md")