Skip to content

Commit 59e1c46

Browse files
authored
Meson clean up (#776)
* Meson clean up * Update flatpak configuration * Update github actions * Addressed comments
1 parent 3b6c58a commit 59e1c46

10 files changed

Lines changed: 139 additions & 250 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,22 @@
1-
name: CI
1+
name: Build
22

33
on: [pull_request]
44

55
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
container:
9-
image: elementary/docker:unstable
10-
steps:
11-
- uses: actions/checkout@v1
12-
- name: Install Dependencies
13-
run: |
14-
apt update
15-
apt install -y libarchive-dev valac meson appstream-util xvfb at-spi2-core git build-essential autoconf autoconf-archive autopoint automake pkg-config libtool m4 autoconf-archive gtk-doc-tools libxml2-utils gobject-introspection libgirepository1.0-dev libglib2.0-dev libjson-glib-dev gettext libcairo2-dev libgtk-3-dev
16-
- name: Build
17-
run: |
18-
meson build
19-
ninja -C build
20-
ninja -C build install
21-
226
flatpak:
237
name: Flatpak
248
runs-on: ubuntu-latest
259

2610
container:
27-
image: ghcr.io/elementary/flatpak-platform/runtime:6
11+
image: ghcr.io/elementary/flatpak-platform/runtime:8.2
2812
options: --privileged
2913

3014
steps:
3115
- name: Checkout
32-
uses: actions/checkout@v2
16+
uses: actions/checkout@v6
3317

3418
- name: Build
35-
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
19+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.6
3620
with:
3721
bundle: akira-dev.flatpak
3822
manifest-path: com.github.akiraux.akira.yml

.github/workflows/lint.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: "CI: Lint"
1+
name: Lint
22

33
on:
44
push:
55
branches:
6-
- "master"
6+
- main
77
pull_request:
88

99
jobs:
1010
lint:
11-
1211
runs-on: ubuntu-latest
1312

1413
container:
1514
image: valalang/lint
1615

1716
steps:
18-
- uses: actions/checkout@v1
19-
- name: Lint
20-
run: io.elementary.vala-lint -d .
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Lint
21+
run: io.elementary.vala-lint -d .
Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"app-id": "com.github.akiraux.akiraDevel",
2+
"app-id": "com.github.akiraux.akira",
33
"runtime": "org.gnome.Platform",
4-
"runtime-version": "40",
4+
"runtime-version": "49",
55
"sdk": "org.gnome.Sdk",
66
"base": "io.elementary.BaseApp",
7-
"base-version": "juno-20.08",
8-
"command": "com.github.akiraux.akiraDevel",
7+
"base-version": "circe-25.08",
8+
"command": "com.github.akiraux.akira",
99
"cleanup": [
1010
"/include",
1111
"/lib/pkgconfig",
@@ -24,83 +24,15 @@
2424
"--filesystem=xdg-run/gvfsd"
2525
],
2626
"modules": [
27-
{
28-
"name": "elementary-stylesheet",
29-
"buildsystem": "meson",
30-
"sources": [{
31-
"type": "git",
32-
"url": "https://github.com/elementary/stylesheet.git",
33-
"commit": "3047efbfabe723e0b0f2b8ee3d53bed528be4b14"
34-
}],
35-
"modules": [{
36-
"name": "sassc",
37-
"cleanup": [
38-
"*"
39-
],
40-
"sources": [{
41-
"type": "git",
42-
"url": "https://github.com/sass/sassc.git",
43-
"tag": "3.6.1"
44-
},
45-
{
46-
"type": "script",
47-
"dest-filename": "autogen.sh",
48-
"commands": [
49-
"autoreconf -si"
50-
]
51-
}
52-
],
53-
"modules": [{
54-
"name": "libsass",
55-
"cleanup": [
56-
"*"
57-
],
58-
"sources": [{
59-
"type": "git",
60-
"url": "https://github.com/sass/libsass.git",
61-
"tag": "3.6.4"
62-
},
63-
{
64-
"type": "script",
65-
"dest-filename": "autogen.sh",
66-
"commands": [
67-
"autoreconf -si"
68-
]
69-
}
70-
]
71-
}]
72-
}]
73-
},
74-
{
75-
"name": "elementary-icons",
76-
"buildsystem": "meson",
77-
"sources": [{
78-
"type": "git",
79-
"url": "https://github.com/elementary/icons.git",
80-
"commit": "9e7ace3d6c1d1e3b5ea64012a371e46039bf044a"
81-
}],
82-
"modules": [{
83-
"name": "xcursorgen",
84-
"cleanup": [
85-
"*"
86-
],
87-
"sources": [{
88-
"type": "git",
89-
"url": "https://gitlab.freedesktop.org/xorg/app/xcursorgen.git",
90-
"tag": "xcursorgen-1.0.7"
91-
}]
92-
}]
93-
},
9427
{
9528
"name": "akira",
9629
"buildsystem": "meson",
97-
"config-opts": [
98-
"-Dprofile=development"
99-
],
100-
"sources": [{
101-
"type": "dir",
102-
"path": "../../"
103-
}]
30+
"sources": [
31+
{
32+
"type": "dir",
33+
"path": "../../"
34+
}
35+
]
10436
}
10537
]
10638
}

aux/meson/post_install.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

com.github.akiraux.akira.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
app-id: com.github.akiraux.akira
22
runtime: io.elementary.Platform
3-
runtime-version: '6'
3+
runtime-version: "8.2"
44
sdk: io.elementary.Sdk
55
command: com.github.akiraux.akira
66

77
finish-args:
8-
- '--share=ipc'
9-
- '--socket=fallback-x11'
10-
- '--socket=wayland'
11-
12-
# needed for perfers-color-scheme
13-
- '--system-talk-name=org.freedesktop.Accounts'
14-
15-
- '--filesystem=home'
16-
- '--device=dri'
8+
- --share=ipc
9+
- --socket=fallback-x11
10+
- --socket=wayland
11+
- --filesystem=home
12+
- --device=dri
1713

1814
modules:
1915
- name: akira

data/meson.build

Lines changed: 39 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,66 @@
1-
assets_dir = join_paths(akira_datadir, 'pixmaps', application_id)
21
install_data(
3-
'assets/akira-banner.jpg',
4-
install_dir: assets_dir
2+
'assets/akira-banner.jpg',
3+
install_dir: akira_datadir / 'pixmaps' / application_id,
54
)
65

76
icon_sizes = ['16', '24', '32', '48', '64', '128']
8-
icons_dir = join_paths(akira_datadir, 'icons', 'hicolor')
7+
icons_dir = akira_datadir / 'icons' / 'hicolor'
98
foreach size : icon_sizes
10-
install_data(
11-
join_paths('icons', size + 'x' + size, application_id + '.svg'),
12-
install_dir: join_paths(icons_dir, size + 'x' + size, 'apps')
13-
)
14-
install_data(
15-
join_paths('icons', size + 'x' + size, application_id + '.svg'),
16-
install_dir: join_paths(icons_dir, size + 'x' + size + '@2', 'apps')
17-
)
18-
install_data(
19-
join_paths('icons', size + 'x' + size, application_id + '.svg'),
20-
install_dir: join_paths(icons_dir, size + 'x' + size, 'mimetypes')
21-
)
9+
install_data(
10+
'icons' / '@0@x@0@'.format(size) / '@0@.svg'.format(application_id),
11+
install_dir: icons_dir / '@0@x@0@'.format(size) / 'apps',
12+
)
13+
install_data(
14+
'icons' / '@0@x@0@'.format(size) / '@0@.svg'.format(application_id),
15+
install_dir: icons_dir / '@0@x@0@'.format(size) + '@2' / 'apps',
16+
)
17+
install_data(
18+
'icons' / '@0@x@0@'.format(size) / '@0@.svg'.format(application_id),
19+
install_dir: icons_dir / '@0@x@0@'.format(size) / 'mimetypes',
20+
)
2221
endforeach
2322

2423
install_data(
25-
'icons/128x128/' + meson.project_name() + '.svg',
26-
rename: application_id + '.svg',
27-
install_dir: join_paths(icons_dir, 'scalable', 'apps')
24+
'icons' / '128x128' / '@0@.svg'.format(application_id),
25+
rename: '@0@.svg'.format(application_id),
26+
install_dir: icons_dir / 'scalable' / 'apps',
2827
)
2928

3029
desktop_file_conf = configuration_data()
3130
desktop_file_conf.set('ICON_NAME', application_id)
3231
desktop_file_conf.set('EXECUTABLE', application_id)
3332

3433
desktop_file = i18n.merge_file(
35-
input: configure_file(
36-
input: meson.project_name() + '.desktop.in.in',
37-
output: '@BASENAME@',
38-
configuration: desktop_file_conf
39-
),
40-
output: application_id + '.desktop',
41-
po_dir: join_paths(meson.source_root(), 'po'),
42-
type: 'desktop',
43-
install: true,
44-
install_dir: join_paths(akira_datadir, 'applications')
34+
input: configure_file(
35+
input: '@0@.desktop.in.in'.format(meson.project_name()),
36+
output: '@0@.desktop.in'.format(application_id),
37+
configuration: desktop_file_conf,
38+
),
39+
output: '@0@.desktop'.format(application_id),
40+
po_dir: meson.project_source_root() / 'po',
41+
type: 'desktop',
42+
install: true,
43+
install_dir: akira_datadir / 'applications',
4544
)
46-
if desktop_file_validate.found()
47-
test(
48-
'validate-desktop',
49-
desktop_file_validate,
50-
args: [
51-
desktop_file.full_path()
52-
]
53-
)
54-
endif
5545

5646
appdata_file_conf = configuration_data()
5747
appdata_file_conf.set('APP_ID', application_id)
5848
appdata_file_conf.set('GETTEXT_PACKAGE', application_id)
5949

6050
appdata_file = i18n.merge_file(
61-
input: configure_file(
62-
input: meson.project_name() + '.appdata.xml.in.in',
63-
output: '@BASENAME@',
64-
configuration: appdata_file_conf
65-
),
66-
output: application_id + '.appdata.xml',
67-
po_dir: join_paths(meson.source_root(), 'po'),
68-
install: true,
69-
install_dir: join_paths(akira_datadir, 'metainfo')
51+
input: configure_file(
52+
input: '@0@.appdata.xml.in.in'.format(meson.project_name()),
53+
output: '@0@.appdata.xml.in'.format(application_id),
54+
configuration: appdata_file_conf,
55+
),
56+
output: '@0@.appdata.xml'.format(application_id),
57+
po_dir: meson.project_source_root() / 'po',
58+
install: true,
59+
install_dir: akira_datadir / 'metainfo',
7060
)
71-
if appstream_util.found()
72-
test(
73-
'validate-appdata', appstream_util,
74-
args: [
75-
'validate-relax', '--nonet', appdata_file.full_path()
76-
]
77-
)
78-
endif
7961

8062
install_data(
81-
meson.project_name() + '.mime.xml',
82-
install_dir: join_paths(akira_datadir, 'mime', 'packages')
63+
'@0@.mime.xml'.format(meson.project_name()),
64+
install_dir: akira_datadir / 'mime' / 'packages',
8365
)
8466
subdir('schemas')

data/schemas/meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ schemas_conf.set('SCHEMA_PATH', schema_path)
44
schemas_conf.set('GETTEXT_PACKAGE', gettext_package)
55

66
configure_file(
7-
input: meson.project_name() + '.gschema.xml.in',
8-
output: application_id + '.gschema.xml',
9-
configuration: schemas_conf,
10-
install_dir: join_paths(akira_datadir, 'glib-2.0', 'schemas')
7+
input: '@0@.gschema.xml.in'.format(meson.project_name()),
8+
output: '@0@.gschema.xml'.format(application_id),
9+
configuration: schemas_conf,
10+
install_dir: akira_datadir / 'glib-2.0' / 'schemas',
1111
)

0 commit comments

Comments
 (0)