actions.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 shelltools
  9. def setup():
  10. # use python2.x
  11. pisitools.dosed("configure", "(\/usr\/include\/)python\*", r"\1python2*")
  12. # fix unused direct dependency
  13. pisitools.dosed("Makefile.in", "(PLFLAGS=)`\$\$pyconfig --libs`", r"\1'-lpython2.7'")
  14. pisitools.dosed("Makefile.in", "(PLDFLAGS=)`\$\$pyconfig --ldflags`", r"\1'-lpython2.7 -Xlinker -export-dynamic'")
  15. shelltools.echo("config.h.in", "#define USE_INTERP_RESULT 1")
  16. shelltools.export("PYTHON", "/usr/bin/python2.7")
  17. autotools.configure("\
  18. --with-gpm-support \
  19. ")
  20. def build():
  21. autotools.make()
  22. def install():
  23. autotools.install()
  24. # remove static lib
  25. pisitools.remove("/usr/lib/libnewt.a")
  26. pisitools.dodoc("CHANGES", "COPYING")