actions.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import autotools
  10. def setup():
  11. shelltools.unlink("configure.ac")
  12. shelltools.sym("patches/acconfig.h", "acconfig.h")
  13. autotools.autoreconf("-vfi")
  14. pisitools.dosed("src/Makefile.in", "@LIBWMF_GDK_PIXBUF_TRUE@", "#")
  15. autotools.configure("--without-expat \
  16. --with-libxml2 \
  17. --with-jpeg \
  18. --with-x \
  19. --with-gsfontdir=/usr/share/fonts/default/ghostscript \
  20. --with-fontdir=/usr/share/libwmf/fonts \
  21. --with-docdir=/usr/share/doc/%s \
  22. --disable-static" % get.srcNAME() )
  23. def build():
  24. autotools.make("LIBTOOL=/usr/bin/libtool")
  25. def install():
  26. pisitools.dosed("fonts/fontmap", "libwmf/fonts", "fonts/default/ghostscript")
  27. autotools.rawInstall("DESTDIR=%s \
  28. fontdir=/usr/share/libwmf/fonts \
  29. wmfonedocdir=/usr/share/doc/%s/caolan \
  30. wmfdocdir=/usr/share/doc/%s" %
  31. ( get.installDIR(), get.srcNAME(), get.srcNAME() ) )
  32. if shelltools.isDirectory("%s/usr/lib/gtk-2.0" % get.installDIR()):
  33. # seems "/usr/lib/gtk-2.0" no longer exists, so need check
  34. pisitools.removeDir("/usr/lib/gtk-2.0")
  35. # These fonts included in gnu-gs-fonts-std package.
  36. pisitools.remove("/usr/share/libwmf/fonts/*afm")
  37. pisitools.remove("/usr/share/libwmf/fonts/*pfb")
  38. pisitools.dodoc("README", "AUTHORS", "CREDITS", "ChangeLog", "NEWS", "TODO")