14 # Variables for 'waf dist'
23 def display_msg(conf
, msg
, status
= None, color
= None):
25 if type(status
) == bool and status
or status
== "True":
27 elif type(status
) == bool and not status
or status
== "False":
29 Utils
.pprint('NORMAL', "%s :" % msg
.ljust(conf
.line_just
), sep
='')
30 Utils
.pprint(color
, status
)
34 opt
.tool_options('compiler_cc vala')
38 conf
.check_tool('compiler_cc vala')
39 conf
.check_tool('intltool')
41 conf
.check_cfg(package
='glib-2.0', uselib_store
='GLIB', atleast_version
='2.28.0', args
='--cflags --libs', mandatory
=True)
42 conf
.check_cfg(package
='gobject-2.0', uselib_store
='GOBJECT', atleast_version
='2.28.0', args
='--cflags --libs', mandatory
=True)
43 conf
.check_cfg(package
='gmodule-export-2.0', uselib_store
='GMODULE', atleast_version
='2.28.0', args
='--cflags --libs', mandatory
=True)
44 conf
.check_cfg(package
='gtk+-3.0', uselib_store
='GTK', atleast_version
='3.0.0', args
='--cflags --libs', mandatory
=True)
45 conf
.check_cfg(package
='gstreamer-0.10', uselib_store
='GST', atleast_version
='0.10.20', args
='--cflags --libs', mandatory
=True)
46 conf
.check_cfg(package
='gstreamer-base-0.10', uselib_store
='GST_BASE', atleast_version
='0.10.20', args
='--cflags --libs', mandatory
=True)
47 conf
.check_cfg(package
='gstreamer-pbutils-0.10', uselib_store
='GST_PBUTILS', atleast_version
='0.10.20', args
='--cflags --libs', mandatory
=True)
48 conf
.check_cfg(package
='libnotify', uselib_store
='NOTIFY', atleast_version
='0.7.0', args
='--cflags --libs', mandatory
=True)
50 conf
.define('PACKAGE', NAME
)
51 conf
.define('PACKAGE_NAME', APPNAME
)
52 conf
.define('PACKAGE_VERSION', VERSION
)
53 conf
.define('PACKAGE_DATADIR', conf
.env
['PREFIX'] + '/share/')
54 conf
.define('PACKAGE_LOCALEDIR', conf
.env
['PREFIX'] + '/share/locale/')
55 conf
.define('PACKAGE_SCHEMA', '/org/gnome/' + NAME
)
56 conf
.define('GETTEXT_PACKAGE', APPNAME
+ '-' + VERSION
)
58 conf
.env
['PREFIX'] = os
.path
.abspath(os
.path
.expanduser(os
.path
.normpath(conf
.env
['PREFIX'])))
59 conf
.env
.append_value('CCFLAGS', '-DHAVE_CONFIG_H --export-dynamic -Wall -g')
60 conf
.write_config_header('config.h')
62 display_msg(conf
, "Install prefix", conf
.env
['PREFIX'])
66 libdictix_sources
= '''
67 libdictix/dix-player.c
68 libdictix/dix-recorder.c
69 libdictix/dix-tag-reader.c
70 libdictix/dix-tag-writer.c
71 libdictix/dix-transcoder.c
78 src/dix-preferences.vala
79 src/dix-properties.vala
85 obj
= bld
.new_task_gen('cc', 'staticlib')
86 obj
.source
= libdictix_sources
87 obj
.includes
= ['.', './libdictix']
88 obj
.name
= 'libdictix_static'
89 obj
.target
= 'dictix_static'
91 obj
.uselib
= 'GLIB GOBJECT GST GST_BASE GST_PBUTILS'
92 obj
.ccflags
= ['-Wall', '-g']
95 obj
= bld
.new_task_gen('cc', 'program')
96 obj
.source
= dictix_sources
97 obj
.includes
= ['.', 'src/', 'libdictix/']
98 obj
.vapi_dirs
= 'vapi/',
100 obj
.target
= 'dictix'
102 obj
.install_path
= os
.path
.join('${PREFIX}', 'bin');
103 obj
.uselib
= 'GLIB GOBJECT GMODULE GTK GST NOTIFY'
104 obj
.packages
= 'glib-2.0 gobject-2.0 gtk+-3.0 gstreamer-0.10 libnotify'
105 obj
.packages
+= ' config libdictix'
106 obj
.ccflags
= ['-include', 'config.h']
107 obj
.uselib_local
= 'libdictix_static'
109 bld
.install_files(bld
.env
['DATADIR'] + "/" + NAME
, 'data/main.ui')
110 bld
.install_files(bld
.env
['DATADIR'] + "/" + NAME
, 'data/menu.ui')
112 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/16x16/apps', 'data/icons/16x16/dictix.png')
113 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/22x22/apps', 'data/icons/22x22/dictix.png')
114 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/24x24/apps', 'data/icons/24x24/dictix.png')
115 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/32x32/apps', 'data/icons/32x32/dictix.png')
116 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/48x48/apps', 'data/icons/48x48/dictix.png')
117 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/256x256/apps', 'data/icons/256x256/dictix.png')
118 bld
.install_files(bld
.env
['DATADIR'] + '/icons/hicolor/scalable/apps', 'data/icons/scalable/dictix.svg')
120 obj
= bld
.new_task_gen(features
= 'subst', source
= 'data/dictix.desktop.in')
121 bld
.install_files(bld
.env
['DATADIR'] + '/applications', 'data/dictix.desktop')
124 gnome
.postinstall_icons()