actions.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 libtools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import get
  11. def setup():
  12. #autotools.autoreconf("-vfi")
  13. #libtools.libtoolize("--force --copy")
  14. # May have trouble with cpu flags
  15. autotools.configure("--with-x \
  16. --enable-libxmi \
  17. --enable-libplotter \
  18. --enable-ps-fonts-in-pcl \
  19. --enable-static=no")
  20. # fix rpath handling
  21. shelltools.system("sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool")
  22. shelltools.system("sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool")
  23. def build():
  24. autotools.make()
  25. def install():
  26. autotools.install("datadir=%s/usr/share" % get.installDIR())
  27. # these files are too generic named and they conflict with other packages like cel
  28. for f in shelltools.ls("%s/usr/bin" % get.installDIR()):
  29. pisitools.rename("/usr/bin/%s" % f, "plotutils-%s" % f)
  30. pisitools.dodoc("AUTHORS", "COMPAT", "ChangeLog", "KNOWN_BUGS", "NEWS", "ONEWS", "PROBLEMS", "README", "THANKS", "TODO")
  31. # FIXME: we are not installing the ps fonts now, we should check if it breaks ghostscript and printers
  32. # read INSTALL.fonts for more info