Improve search regex
[debian/pino.git] / wscript
diff --git a/wscript b/wscript
index 3b6871c..06d51f1 100644 (file)
--- a/wscript
+++ b/wscript
@@ -2,7 +2,7 @@
 
 import intltool
 
-VERSION = "0.2.5"
+VERSION = "0.2.10"
 VERSION_MAJOR_MINOR =  ".".join(VERSION.split(".")[0:2])
 APPNAME = "pino"
 
@@ -12,6 +12,10 @@ blddir = '_build_'
 def set_options(opt):
        opt.tool_options('compiler_cc')
        opt.tool_options('gnu_dirs')
+       opt.add_option('--ubuntuicons', action = 'store_true', default = False,
+               help = 'Install icons for Ubuntu mono themes')
+       opt.add_option('--debug', action = 'store_true', default = False,
+               help = 'Enable debug messages')
 
 def configure(conf):
        conf.check_tool('compiler_cc vala gnu_dirs intltool')
@@ -39,6 +43,8 @@ def configure(conf):
                atleast_version='1.0', mandatory=True, args='--cflags --libs')
        conf.check_cfg(package='gtkspell-2.0', uselib_store='GTKSPELL',
                atleast_version='2.0', mandatory=True, args='--cflags --libs')
+       conf.check_cfg(package='indicate', uselib_store='LIBINDICATE',
+               atleast_version='0.3', mandatory=False, args='--cflags --libs')
 
        conf.env.append_value('CCFLAGS', '-std=c99')
        
@@ -48,6 +54,8 @@ def configure(conf):
        conf.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
 
        conf.define('APP_VERSION', VERSION)
+       conf.define('DESKTOP_FILE_PATH', conf.env.PREFIX + '/share/applications/pino.desktop')
+       conf.define('APP_PATH', conf.env.PREFIX + '/bin/pino')
        conf.define('LOGO_PATH', conf.env.PREFIX + '/share/icons/hicolor/scalable/apps/pino.svg')
        conf.define('LOGO_FRESH_PATH', conf.env.PREFIX + '/share/icons/hicolor/scalable/apps/pino_fresh.svg')
        conf.define('MENTIONS_PATH', conf.env.PREFIX + '/share/pino/icons/mentions.svg')
@@ -70,6 +78,10 @@ def configure(conf):
        conf.define('LOCALE_DIR', conf.env.PREFIX + '/share/locale/')
        conf.define('GETTEXT_PACKAGE', APPNAME)
        conf.define('APPNAME', APPNAME)
+
+       import Options
+       conf.env.UBUNTUICONS = Options.options.ubuntuicons
+       conf.env.DEBUG = Options.options.debug
        conf.define('CONS_KEY', 'k6R1A0PPkmpRcThEdPF1Q')
        conf.define('CONS_SEC', 'TKneXwqslxkbaR3RQGcvvvGU4Qk01qh8HAhRIMN74')
        
@@ -121,7 +133,12 @@ def build(bld):
        bld.install_files('${PREFIX}/share/applications', 'pino.desktop')
        bld.install_files('${PREFIX}/share/doc/pino', 'COPYING README AUTHORS INSTALL')
        bld.install_files('${PREFIX}/share/indicators/messages/applications', 'indicator/pino')
-       
+
+       if bld.env['UBUNTUICONS']:
+               bld.install_files('${PREFIX}/share/icons/ubuntu-mono-dark/apps/22', 'img/ubuntu-mono-dark/pino-tray-icon.svg')
+               bld.install_files('${PREFIX}/share/icons/ubuntu-mono-dark/apps/22', 'img/ubuntu-mono-dark/pino-tray-icon-fresh.svg')
+               bld.install_files('${PREFIX}/share/icons/ubuntu-mono-light/apps/22', 'img/ubuntu-mono-light/pino-tray-icon.svg')
+               bld.install_files('${PREFIX}/share/icons/ubuntu-mono-light/apps/22', 'img/ubuntu-mono-light/pino-tray-icon-fresh.svg')
        #import subprocess
        #subprocess.Popen(['desktop-file-install', '--rebuild-mime-info-cache', bld.env.PREFIX + '/share/applications/pino.desktop'], stdout=subprocess.PIPE)