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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# The resources (NOTE: needed by e.g. src/)
resource_files = files('contacts.gresource.xml')
resources = gnome.compile_resources('org.gnome.Contacts', resource_files,
c_name: 'resources'
)
# The icons
iconsdir = get_option('datadir') / 'icons' / 'hicolor'
foreach size: ['scalable', 'symbolic']
install_subdir('icons/hicolor/' + size, install_dir: iconsdir)
endforeach
# The desktop file
desktop_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Contacts.desktop.in.in',
output: '@BASENAME@',
configuration: {
'icon': contacts_app_id,
},
),
output: '@0@.desktop'.format(contacts_app_id),
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: get_option('datadir') / 'applications'
)
# Validate the desktop file
desktop_file_validate = find_program ('desktop-file-validate', required: false)
if desktop_file_validate.found()
test('validate-desktop',
desktop_file_validate,
suite: 'data',
args: [
desktop_file.full_path()
],
depends: [
desktop_file,
],
)
endif
# The appdata file
appdata_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Contacts.appdata.xml.in.in',
output: '@BASENAME@',
configuration: {
'app_id': contacts_app_id,
},
),
output: '@0@.appdata.xml'.format(contacts_app_id),
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: get_option('datadir') / 'metainfo',
)
# Validate the appdata file
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test('validate-appdata', appstream_util,
suite: 'data',
args: [
'validate-relax', '--nonet', appdata_file.full_path()
],
depends: [
appdata_file,
],
)
endif
# DBus service files
service_config = {
'app_id': contacts_app_id,
'bindir': contacts_prefix / get_option('bindir'),
'libexecdir': contacts_prefix / get_option('libexecdir'),
}
# The DBUS service file of the app
configure_file(
input: 'org.gnome.Contacts.service.in',
output: '@0@.service'.format(contacts_app_id),
configuration: service_config,
install: true,
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
# The DBUS service file of the search provider
configure_file(
input: 'org.gnome.Contacts.SearchProvider.service.in',
output: '@0@.SearchProvider.service'.format(contacts_app_id),
configuration: service_config,
install: true,
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
# The search provider file
configure_file(
input: 'org.gnome.Contacts.search-provider.ini.in',
output: '@0@.search-provider.ini'.format(contacts_app_id),
configuration: {
'app_id': contacts_app_id,
},
install: true,
install_dir: get_option('datadir') / 'gnome-shell' / 'search-providers',
)
# Manpage
if get_option('manpage')
xsltproc = find_program('xsltproc')
custom_target('manfile-gnome-contacts',
input: 'gnome-contacts.xml',
output: 'gnome-contacts.1',
install: true,
install_dir: get_option('mandir') / 'man1',
command: [
xsltproc,
'--nonet',
'--stringparam', 'man.output.quietly', '1',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.th.extra1.suppress', '1',
'--stringparam', 'man.authors.section.enabled', '0',
'--stringparam', 'man.copyright.section.enabled', '0',
'-o', '@OUTPUT@',
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
'@INPUT@'
]
)
endif
|