actions.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python3
  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 inary.actionsapi import autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. WorkDir = "djvulibre-%s" % get.srcVERSION() if len(get.srcVERSION().split(".")) < 4 else "djvulibre-%s" % get.srcVERSION()[:get.srcVERSION().rfind(".")]
  11. def setup():
  12. shelltools.system("./autogen.sh")
  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. inarytools.insinto("/usr/share/mime/packages", "desktopfiles/djvulibre-mime.xml")
  24. for size in ["22", "32", "48", "64"]:
  25. inarytools.insinto("/usr/share/icons/hicolor/%sx%s/mimetypes" %(size, size), "desktopfiles/prebuilt-hi%s-djvu.png" % size, "image-vnd.djvu.png")
  26. inarytools.dodoc("COPY*", "README", "NEWS")