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
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'gtk-engines'
version = '2.20.2'
licenses = [License.LGPLv2Plus]
deps = ['gtk+']
files_etc = ['etc/gtk-2.0/gtkrc']
files_lang = ['gtk-engines']
files_engines_libs = [
'lib/gtk-2.0/2.10.0/engines/libclearlooks%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libcrux-engine%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libglide%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libhcengine%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libindustrial%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libmist%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libredmond95%(mext)s',
'lib/gtk-2.0/2.10.0/engines/libthinice%(mext)s',
]
files_share_engines = [
'share/gtk-engines/clearlooks.xml',
'share/gtk-engines/crux-engine.xml',
'share/gtk-engines/glide.xml',
'share/gtk-engines/hcengine.xml',
'share/gtk-engines/industrial.xml',
'share/gtk-engines/mist.xml',
'share/gtk-engines/redmond95.xml',
'share/gtk-engines/thinice.xml',
]
files_themes = [
'share/themes/Clearlooks/gtk-2.0/gtkrc',
'share/themes/Crux/gtk-2.0/gtkrc',
'share/themes/Industrial/gtk-2.0/gtkrc',
'share/themes/Mist/gtk-2.0/gtkrc',
'share/themes/Redmond/gtk-2.0/gtkrc',
'share/themes/ThinIce/gtk-2.0/gtkrc',
]
files_devel = ['lib/pkgconfig/gtk-engines-2.pc']
def post_install(self):
theme = "Clearlooks"
if self.config.target_platform == Platform.WINDOWS:
theme = "MS-Windows"
gtkrc = 'gtk-theme-name = "%s"\n '\
'gtk-fallback-icon-theme = "Tango"' % theme
gtkrc_file = os.path.join(self.config.prefix, 'etc', 'gtk-2.0', 'gtkrc')
with open(gtkrc_file, 'w+') as f:
f.write(gtkrc)
|