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