wscript 787 B

1234567891011121314151617181920212223242526272829303132333435
  1. #! /usr/bin/env python
  2. from waflib import Utils
  3. def build(bld):
  4. def post_update(bld):
  5. try:
  6. bld.exec_command(["update-mime-database", Utils.subst_vars("${DATADIR}/mime", bld.env)])
  7. bld.exec_command(["update-desktop-database", Utils.subst_vars("${DATADIR}/applications", bld.env)])
  8. except Exception:
  9. pass
  10. if bld.cmd == 'install':
  11. bld.add_post_fun(post_update)
  12. bld(
  13. features = "intltool_in",
  14. podir = "../po",
  15. style = "desktop",
  16. source = 'kupfer.desktop.in',
  17. target = 'kupfer.desktop',
  18. install_path = "${DATADIR}/applications",
  19. )
  20. bld(
  21. features = "intltool_in",
  22. podir = "../po",
  23. style = "xml",
  24. source = 'kupfer-mimetypes.xml.in',
  25. target = 'kupfer-mimetypes.xml',
  26. install_path = "${DATADIR}/mime/packages/",
  27. )