This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
81 lines (73 loc) · 2.92 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/env python
#
# Copyright (c) 2010 Trent McPheron <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
APPNAME = 'xfce4-namebar-plugin'
VERSION = '1.0.0'
top = '.'
out = 'build'
def options (ctx):
ctx.load('compiler_c vala')
def configure (ctx):
ctx.load('compiler_c vala')
args = '--cflags --libs'
ctx.check_cfg(package = 'glib-2.0', atleast_version = '2.62',
uselib_store = 'GLIB', mandatory = True, args = args)
ctx.check_cfg(package = 'gtk+-3.0', atleast_version = '3.22',
uselib_store = 'GTK', mandatory = True, args = args)
ctx.check_cfg(package = 'libxfce4panel-2.0', atleast_version = '4.12',
uselib_store = 'XFCE4PANEL', mandatory = True, args = args)
ctx.check_cfg(package = 'libwnck-3.0', atleast_version = '3.22',
uselib_store = 'LIBWNCK', mandatory = True, args = args)
def build (ctx):
ctx.shlib(
features = 'c cshlib',
vapi_dirs = 'vapi',
source = ctx.path.ant_glob('src/*'),
packages = 'glib-2.0 gtk+-3.0 libxfce4panel-2.0 libwnck-3.0',
target = 'namebar',
install_path = '${LIBDIR}/xfce4/panel/plugins/',
uselib = 'GLIB GTK XFCE4PANEL LIBWNCK',
defines = ['WNCK_I_KNOW_THIS_IS_UNSTABLE'])
ctx(
features = 'subst',
source = 'data/namebar.desktop.in',
target = 'data/namebar.desktop')
data_dir = ctx.path.find_dir('data')
ctx.install_files(
'${PREFIX}/share/namebar/',
data_dir.ant_glob('themes/**/*'),
cwd = data_dir,
relative_trick = True)
ctx.install_files(
'${PREFIX}/share/xfce4/panel/plugins/',
'data/namebar.desktop')
ctx.install_files(
'${PREFIX}/share/pixmaps/',
'data/xfce4-namebar.png')
ctx.install_files(
'${PREFIX}/bin/',
'data/convert-wb-to-nb',
chmod=0o755)
def checkinstall (ctx):
ctx.exec_command('checkinstall --pkgname=' + APPNAME +
' --pkgversion=' + VERSION + ' --provides=' + APPNAME +
' --deldoc=yes --deldesc=yes --delspec=yes --backup=no' +
' --exclude=/home -y ./waf install')