Imported Upstream version 0.2.8
[debian/pino.git] / wscript
diff --git a/wscript b/wscript
index 3222457..1cf6760 100644 (file)
--- a/wscript
+++ b/wscript
@@ -2,7 +2,7 @@
 
 import intltool
 
-VERSION = "0.2.1"
+VERSION = "0.2.8"
 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')
@@ -37,13 +41,21 @@ def configure(conf):
                atleast_version='1.0', mandatory=True, args='--cflags --libs')
        conf.check_cfg(package='unique-1.0', uselib_store='LIBUNIQUE',
                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')
+       
        conf.define('PACKAGE', APPNAME)
        conf.define('PACKAGE_NAME', APPNAME)
        conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
        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')
@@ -54,6 +66,9 @@ def configure(conf):
        conf.define('DIRECT_FRESH_PATH', conf.env.PREFIX + '/share/pino/icons/direct_fresh.svg')
        conf.define('PROGRESS_PATH', conf.env.PREFIX + '/share/pino/icons/progress.gif')
        conf.define('DIRECT_REPLY_PATH', conf.env.PREFIX + '/share/pino/icons/direct_reply.png')
+       conf.define('FAVORITE_PATH', conf.env.PREFIX + '/share/pino/icons/favorite.png')
+       conf.define('FAVORITE_NO_PATH', conf.env.PREFIX + '/share/pino/icons/favorite_no.png')
+       #conf.define('FAVORITE_MENU_PATH', conf.env.PREFIX + '/share/pino/icons/favorite_menu.svg')
        conf.define('REPLY_PATH', conf.env.PREFIX + '/share/pino/icons/reply.png')
        conf.define('RETWEET_PATH', conf.env.PREFIX + '/share/pino/icons/re_tweet.png')
        conf.define('DELETE_PATH', conf.env.PREFIX + '/share/pino/icons/delete_status.png')
@@ -63,6 +78,12 @@ 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')
        
        # AUTHORS --> About dialog
        f = open('AUTHORS', 'r')
@@ -88,6 +109,7 @@ def init_defs(prefix):
 
 def build(bld):
        bld.add_subdirs('src')
+       #bld.add_subdirs('liboauth-client')
        bld.add_subdirs('templates')
        bld.add_subdirs('po')
        
@@ -101,13 +123,22 @@ def build(bld):
        bld.install_files('${PREFIX}/share/pino/icons', 'img/direct_fresh.svg')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/progress.gif')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/direct_reply.png')
+       bld.install_files('${PREFIX}/share/pino/icons', 'img/favorite.png')
+       bld.install_files('${PREFIX}/share/pino/icons', 'img/favorite_no.png')
+       #bld.install_files('${PREFIX}/share/pino/icons', 'img/favorite_menu.svg')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/reply.png')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/re_tweet.png')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/delete_status.png')
        bld.install_files('${PREFIX}/share/pino/icons', 'img/userpic.svg')
        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)