File: meson.build

package info (click to toggle)
hydrapaper 3.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 708 kB
  • sloc: python: 2,427; sh: 72; xml: 20; makefile: 2
file content (151 lines) | stat: -rw-r--r-- 3,978 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
conf = configuration_data()
conf.set('bindir', join_paths(prefix, bindir))
conf.set('prettyname', prettyname)
conf.set('appid', app_id)
conf.set('projectname', meson.project_name())
conf.set('libexecdir', libexecdir)
conf.set('apppath', app_id_aspath)

desktop_file = configure_file(
    input: app_id + '.desktop.in',
    output: app_id + '.desktop.i18n.in',
    configuration: conf
)

i18n.merge_file(
    input: desktop_file,
    output: app_id + '.desktop',
    po_dir: '../po',
    type: 'desktop',
    install: true,
    install_dir: join_paths(datadir, 'applications')
)

configure_file(
    input: app_id + '.service.in',
    output: app_id + '.service',
    configuration: conf,
    install_dir: dbus_service_dir
)

if enable_daemon
    configure_file(
        input: app_id + '.Daemon.service.in',
        output: app_id + '.Daemon.service',
        configuration: conf,
        install: true,
        install_dir: dbus_service_dir
    )

    configure_file(
        input: app_id + '.Daemon.service.systemd.in',
        output: app_id + 'd.service',
        configuration: conf,
        install: true,
        install_dir: systemd_user_unit_dir
    )

    daemon_desktop_file = configure_file(
        input: app_id + '.Daemon.desktop.in',
        output: app_id + '.Daemon.desktop.i18n.in',
        configuration: conf
    )

    i18n.merge_file(
        input: daemon_desktop_file,
        output: app_id + '.Daemon.desktop',
        po_dir: '../po',
        type: 'desktop',
        install: true,
        # install_dir: join_paths(etcdir, 'xdg', 'autostart')
        install_dir: join_paths(datadir, 'applications')
    )
endif

configure_file(
    input: app_id + '.gschema.xml.in',
    output: app_id + '.gschema.xml',
    configuration: conf,
    install_dir: join_paths(datadir, 'glib-2.0/schemas')
)

icondir = join_paths(datadir, 'icons/hicolor')
install_data(
    'icons/'+app_id+'.svg',
    install_dir: join_paths(icondir, 'scalable/apps')
)
install_data(
    'icons/'+app_id+'-symbolic.svg',
    install_dir: join_paths(icondir, 'symbolic/apps')
)

subdir('ui')

blueprints = custom_target('blueprints',
    input: files(
        'ui/headerbar.blp',
        'ui/monitors_flowbox_item.blp',
        'ui/shortcutsWindow.blp',
        'ui/wallpaper_flowbox_item_popover.blp',
        'ui/wallpapers_flowbox.blp',
        'ui/wp_mode_popover_menu.blp',
        'ui/wallpapers_folders_view.blp',
        'ui/wallpaper_flowbox_item.blp',
    ),
    output: '.',
    command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@']
)


app_resources = gnome.compile_resources(app_id,
    app_id + '.gresource.xml',
    gresource_bundle: true,
    dependencies: [blueprints, configure_file(
        input: 'ui/aboutdialog.ui.in',
        output: 'aboutdialog.ui',
        configuration: ui_conf
        )],
    install: true,
    install_dir: pkgdatadir
)

app_settings = gnome.compile_schemas()

#appdata_conf = configuration_data()
#appdata_conf.set('authorfullname', authorfullname)
#appdata_conf.set('gitrepo', gitrepo)
#appdata_conf.set('website', website)
#appdata_conf.set('authoremail', authoremail)
#appdata_conf.set('prettyname', prettyname)
#appdata_conf.set('appid', app_id)
#appdata_conf.set('prettylicense', prettylicense)
#
#configure_file(
#    input: appdata_file,
#    output: app_id + '.appdata.xml.',
#    configuration: appdata_conf,
#    install: true,
#    install_dir: join_paths(datadir, 'metainfo')
#)

ascli_exe = find_program('appstreamcli', required: false)
if ascli_exe.found()
    test(
        'validate metainfo file',
        ascli_exe,
        args: [
            'validate',
            #'--no-net',
            #'--pedantic',
            'data/' + app_id + '.appdata.xml'
        ]
    )
endif

i18n.merge_file(
    input: app_id + '.appdata.xml.in',
    output: app_id + '.appdata.xml',
    po_dir: '../po',
    install: true,
    install_dir: join_paths(datadir, 'metainfo')
)