Skip to content
Snippets Groups Projects
Verified Commit 4036310c authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

A few build system tweaks

parent 341196d9
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: 2018-2022 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2018-2023 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: GPL-3.0-or-later
......@@ -20,12 +20,12 @@ modules:
sources:
- type: git
url: https://gitlab.gnome.org/jwestman/blueprint-compiler
tag: v0.4.0
tag: v0.6.0
- name: rugby
buildsystem: meson
builddir: true
sources:
- type: git
url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git
- type: dir
path: .
config_opts:
- "-Dprofile=development"
# SPDX-FileCopyrightText: 2016-2022 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2016-2023 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: GPL-3.0-or-later
......@@ -13,26 +13,31 @@ blueprints = custom_target('blueprints',
)
resources = gnome.compile_resources('gen-resources',
'rugby.gresource.xml',
'uk.me.bcowan.Rugby.gresource.xml',
source_dir: 'data',
dependencies: blueprints)
desktop_file = 'uk.me.bcowan.Rugby.desktop'
install_data(desktop_file,
install_dir: join_paths(get_option('datadir'), 'applications'))
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file])
endif
compiled_schemas = gnome.compile_schemas(
build_by_default: true,
depend_files: 'uk.me.bcowan.Rugby.gschema.xml',
install_data('uk.me.bcowan.Rugby.desktop',
install_dir: join_paths(get_option('datadir'), 'applications')
)
install_data(
'uk.me.bcowan.Rugby.gschema.xml',
install_dir: datadir / 'glib-2.0' / 'schemas',
)
install_data(
'uk.me.bcowan.Rugby.metainfo.xml',
install_dir: datadir / 'metainfo',
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
'uk.me.bcowan.Rugby.desktop'
]
)
endif
File moved
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>uk.me.bcowan.Rugby</id>
<name>Rugby</name>
<summary>Find possibilities for rugby scores</summary>
<metadata_license>CC-BY-SA-4.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>
<p>
A program to determine possible combinations of scoring for rugby matches.
</p>
</description>
<launchable type="desktop-id">uk.me.bcowan.Rugby.desktop</launchable>
</component>
# SPDX-FileCopyrightText: 2016-2022 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2016-2023 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: GPL-3.0-or-later
project('rugby', 'c',
version: '0.4.alpha',
license:'GPLv3+',
meson_version: '>= 0.57.0',
meson_version: '>= 0.59.0',
default_options: [
'buildtype=debugoptimized',
'c_std=gnu11',
......@@ -33,16 +33,6 @@ else
conf.set_quoted('VERSION', meson.project_version())
endif
config_h = vcs_tag(
input: configure_file(
output: 'config.h.in',
configuration: conf
),
output: 'config.h',
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: (profile == 'development') ? 'devel' : '',
)
cflags = ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66',
'-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_8',
......@@ -58,4 +48,8 @@ add_project_arguments(cc.get_supported_arguments(cflags),
subdir('data')
subdir('src')
gnome.post_install(glib_compile_schemas: true)
gnome.post_install(
glib_compile_schemas: true,
update_desktop_database: true,
)
# SPDX-FileCopyrightText: 2016-2022 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2016-2023 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: GPL-3.0-or-later
sources = [
......@@ -10,8 +10,18 @@ sources = [
'rugby-pref-window.c',
]
config_h = vcs_tag(
input: configure_file(
output: 'config.h.in',
configuration: conf,
),
output: 'config.h',
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: (profile == 'development') ? 'devel' : '',
)
executable('rugby',
sources, config_h, resources, compiled_schemas,
sources, config_h, resources,
dependencies: [gio_dep, gtk_dep, libadwaita_dep],
install_dir: get_option('bindir'),
install: true)
[wrap-git]
directory = blueprint-compiler
url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git
revision = v0.4.0
revision = v0.6.0
depth = 1
[provide]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment