bump version 1.2.0
[libprolooks.git] / wscript
blobbc9f2b1c10b15e891b9d183e21df94660e7428cb
1 #!/usr/bin/env python
2 import os
3 import autowaf
5 PROLOOKS_VERSION = "1.2.0"
7 VERSION = PROLOOKS_VERSION
8 VERSION_MAJOR_MINOR = ".".join(VERSION.split(".")[0:2])
9 APPNAME = "libprolooks1"
11 srcdir = '.'
12 blddir = 'build'
14 def set_options(opt):
15 autowaf.set_options(opt)
16 opt.tool_options('compiler_cc')
18 def configure(conf):
19 autowaf.configure(conf)
20 conf.check_tool('compiler_cc cc')
21 conf.check_tool('vala')
23 min_vala_version = (0, 7, 9)
24 if conf.env['VALAC_VERSION'] < min_vala_version:
25 conf.fatal('Your vala compiler version ' + str(conf.env['VALAC_VERSION']) +
26 ' is too old. The project requires at least version %d.%d.%d' % min_vala_version );
28 autowaf.check_pkg(conf, 'gobject-2.0', uselib_store='GOBJECT', atleast_version='2.10.0', mandatory=True)
29 autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.10.0', mandatory=True)
30 autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.0', mandatory=True)
31 autowaf.check_pkg(conf, 'cairo', uselib_store='CAIRO', atleast_version='1.6.0', mandatory=True)
32 autowaf.check_pkg(conf, 'libglade-2.0', uselib_store='GLADE', atleast_version='2.6.2', mandatory=True)
34 conf.env['CCFLAGS'] = '-I./default'
36 conf.define('PACKAGE', APPNAME)
37 conf.define('PACKAGE_NAME', APPNAME)
38 conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
39 conf.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
41 conf.define('VERSION', VERSION)
42 conf.define('VERSION_MAJOR_MINOR', VERSION_MAJOR_MINOR)
44 autowaf.print_summary(conf)
46 def build(bld):
47 autowaf.build_pc(bld, 'PROLOOKS1', PROLOOKS_VERSION, ['GTK'])
48 bld.add_subdirs('prolooks')
49 bld.install_as(os.path.normpath(bld.env['DATADIR'] + '/glade3/catalogs/prolooks.xml'),
50 'prolooks.xml')
51 icons_dir = 'glade-icons/'
52 icon_sizes = ['16x16', '22x22']
53 for s in icon_sizes:
54 for icon in os.listdir(icons_dir + s):
55 bld.install_as(
56 os.path.normpath(bld.env['DATADIR'] + 'glade3/pixmaps/hicolor/' + s + '/actions/' + icon),
57 icons_dir + s + '/' + icon)
59 def shutdown():
60 pass