actions.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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 get
  9. WorkDir = "djvulibre-%s" % get.srcVERSION() if len(get.srcVERSION().split(".")) < 4 else "djvulibre-%s" % get.srcVERSION()[:get.srcVERSION().rfind(".")]
  10. def setup():
  11. autotools.aclocal("-I config")
  12. autotools.autoconf("-f")
  13. autotools.configure("--enable-threads \
  14. --disable-desktopfiles \
  15. --enable-xmltools \
  16. --enable-i18n \
  17. --with-jpeg \
  18. --with-tiff")
  19. def build():
  20. autotools.make()
  21. def install():
  22. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  23. pisitools.insinto("/usr/share/mime/packages", "desktopfiles/djvulibre-mime.xml")
  24. for size in ["22", "32", "48", "64"]:
  25. pisitools.insinto("/usr/share/icons/hicolor/%sx%s/mimetypes" %(size, size), "desktopfiles/prebuilt-hi%s-djvu.png" % size, "image-vnd.djvu.png")
  26. pisitools.dodoc("COPY*", "README", "NEWS")