actions.py 1.5 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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. # fix default source location; use the GDFONTPATH variable to modify at runtime
  12. shelltools.system("sed -i 's|/usr/X11R6/lib/X11/fonts/truetype|/usr/share/fonts/TTF|' src/variable.c")
  13. shelltools.system("sed -i -e 's|/usr/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' \
  14. -e 's|$(X11ROOT)/X11R6/lib/X11/fonts/Type1|$(X11ROOT)/usr/share/fonts/Type1|' \
  15. src/variable.c")
  16. # suppress compiler warnings
  17. pisitools.cflags.add("-Wno-unused-result -Wno-stringop-overflow")
  18. shelltools.system("MAKEINFO=/usr/bin/makeinfo WX_CONFIG=/usr/bin/wx-config ./configure --prefix=/usr \
  19. --libexecdir=/usr/bin \
  20. --with-gihdir=/usr/share/gnuplot \
  21. --with-readline=gnu \
  22. --with-bitmap-terminals \
  23. --with-wx-single-threaded \
  24. --with-texdir=/usr/share/texmf/tex/latex/gnuplot")
  25. def build():
  26. autotools.make("pkglibexecdir=/usr/bin")
  27. def install():
  28. autotools.rawInstall("pkglibexecdir=/usr/bin DESTDIR=%s" % get.installDIR())
  29. pisitools.dodoc("Copyright", "README*")