Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Options
- # For creating a source archive.
- APPNAME = 'xfce4-namebar-plugin'
- VERSION = '0.2'
- # Required waf stuff.
- top = '.'
- out = 'build'
- def options (opt):
- opt.load('compiler_c')
- opt.load('vala')
- def configure (conf):
- # Save prefix and strip off extraneous slash.
- conf.env.prefix = Options.options.prefix
- if conf.env.prefix[-1] == '/' :
- conf.env.prefix = conf.env.prefix[:-1]
- # Check for required stuff.
- conf.load('compiler_c vala')
- args = '--cflags --libs'
- conf.check_cfg(package = 'glib-2.0', atleast_version = '2.10',
- uselib_store = 'GLIB', mandatory = True, args = args)
- conf.check_cfg(package = 'gtk+-2.0', atleast_version = '2.16',
- uselib_store = 'GTK', mandatory = True, args = args)
- conf.check_cfg(package = 'libxfce4panel-1.0', atleast_version = '4.6',
- uselib_store = 'XFCE4PANEL', mandatory = True, args = args)
- conf.check_cfg(package = 'xfce4-vala', atleast_version='4.6',
- uselib_store = 'XFCE4VALA', mandatory = True, args = args)
- conf.check_cfg(package = 'libwnck-1.0', atleast_version = '2.20',
- uselib_store = 'LIBWNCK', mandatory = True, args = args)
- def build (bld):
- # Compile the program.
- src = bld.program(
- features = 'cc cprogram',
- packages = 'glib-2.0 gtk+-2.0 libxfce4panel-1.0 libwnck-1.0',
- target = 'xfce4-namebar-plugin',
- install_path = '${PREFIX}/lib/xfce4/panel-plugins/',
- uselib = 'GLIB GTK XFCE4PANEL LIBWNCK',
- defines = ['WNCK_I_KNOW_THIS_IS_UNSTABLE'])
- src.add_subdirs('src')
- # Substitute the prefix in the desktop file.
- desktop = bld(
- source = 'data/namebar.desktop.in',
- PREFIX = bld.env.prefix)
- #sub = bld(
- # features = 'subst',
- # source = 'data/namebar.desktop.in',
- # target = 'data/namebar.desktop')
- #sub.dict = {'PREFIX' : bld.env.prefix}
- # Install the files.
- data_dir = bld.path.find_dir('data')
- bld.install_files(
- '${PREFIX}/share/namebar/',
- data_dir.ant_glob('themes/**/*'),
- cwd = data_dir,
- relative_trick = True)
- bld.install_files(
- '${PREFIX}/share/xfce4/panel-plugins/',
- 'data/namebar.desktop')
- bld.install_files(
- '${PREFIX}/share/pixmaps/',
- 'data/xfce4-namebar.png')
- bld.install_files(
- '${PREFIX}/bin/',
- 'data/convert-wb-to-nb')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement