debian/rules: fix lib version
[libprolooks.git] / wscript
blob2d7a8d8822c0d4d04ddaf1c9f256344f3198054b
1 #!/usr/bin/env python
2 import os
3 import autowaf
5 PROLOOKS_VERSION = "1.0.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, 5, 7)
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 );
27 if conf.env['VALAC_VERSION'] >= (0, 7, 0):
28 conf.fatal('vala 0.7.x is broken, please use >= %d.%d.%d instead' % min_vala_version );
30 autowaf.check_pkg(conf, 'gobject-2.0', uselib_store='GOBJECT', atleast_version='2.10.0', mandatory=True)
31 autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.10.0', mandatory=True)
32 autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.0', mandatory=True)
33 autowaf.check_pkg(conf, 'cairo', uselib_store='CAIRO', atleast_version='1.6.0', mandatory=True)
34 autowaf.check_pkg(conf, 'libglade-2.0', uselib_store='GLADE', atleast_version='2.6.2', mandatory=True)
36 conf.env['CCFLAGS'] = '-I./default'
38 conf.define('PACKAGE', APPNAME)
39 conf.define('PACKAGE_NAME', APPNAME)
40 conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
41 conf.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
43 conf.define('VERSION', VERSION)
44 conf.define('VERSION_MAJOR_MINOR', VERSION_MAJOR_MINOR)
46 autowaf.print_summary(conf)
48 def build(bld):
49 autowaf.build_pc(bld, 'PROLOOKS1', PROLOOKS_VERSION, ['GTK'])
50 bld.add_subdirs('prolooks')
51 bld.install_as(os.path.normpath(bld.env['DATADIR'] + '/glade3/catalogs/prolooks.xml'),
52 'prolooks.xml')
53 icons_dir = 'glade-icons/'
54 icon_sizes = ['16x16', '22x22']
55 for s in icon_sizes:
56 for icon in os.listdir(icons_dir + s):
57 bld.install_as(
58 os.path.normpath(bld.env['DATADIR'] + 'glade3/pixmaps/hicolor/' + s + '/actions/' + icon),
59 icons_dir + s + '/' + icon)
61 def shutdown():
62 pass