actions.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import autotools
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import libtools
  9. from pisi.actionsapi import get
  10. def setup():
  11. # Do not rebuild docs
  12. shelltools.export("HASDOCBOOK", "no")
  13. libtools.libtoolize("-f")
  14. autotools.autoreconf("-fi")
  15. autotools.configure("--disable-static \
  16. --disable-docs \
  17. --with-cache-dir=/var/cache/fontconfig \
  18. --with-default-fonts=/usr/share/fonts \
  19. --with-add-fonts=/usr/local/share/fonts")
  20. def build():
  21. autotools.make()
  22. def install():
  23. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  24. if get.buildTYPE() == "emul32": return
  25. pisitools.insinto("/etc/fonts", "fonts.conf", "fonts.conf.new")
  26. enabled_configs = ("10-sub-pixel-rgb.conf", "70-yes-bitmaps.conf")
  27. disabled_configs = ("10-no-sub-pixel.conf",)
  28. for cfg in enabled_configs:
  29. pisitools.dosym("../conf.avail/%s" % cfg, "/etc/fonts/conf.d/%s" % cfg)
  30. for cfg in disabled_configs:
  31. pisitools.remove("/usr/share/fontconfig/conf.avail/%s" % cfg)
  32. for i in ["fc-cat", "fc-list", "fc-match", "fc-cache"]:
  33. pisitools.doman("%s/*.1" % i)
  34. pisitools.doman("doc/*.3")
  35. pisitools.dodoc("AUTHORS", "COPYING", "README", "doc/*.txt")