Skip to content

Commit 09fa29b

Browse files
committed
Prepare porting to meson buildsytem
- Setup meson to install python sources during meson builds - Install executable binary using meson - Update debian builds to use meson - Update testing script
1 parent 7a416cb commit 09fa29b

21 files changed

+827
-29
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
__pycache__/
33
*.py[cod]
44
*$py.class
5+
6+
# meson build files
7+
builddir

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Webapp Manager
22
![build](https://github.com/linuxmint/webapp-manager/actions/workflows/build.yml/badge.svg)
3+
![License](https://img.shields.io/github/license/linuxmint/webapp-manager?label=License)
4+
![GitHub repo size](https://img.shields.io/github/repo-size/linuxmint/webapp-manager?label=Repo%20size)
5+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/linuxmint/webapp-manager?label=Latest%20Stable%20Release)
6+
![Downloads](https://img.shields.io/github/downloads/linuxmint/webapp-manager/total?label=Downloads&style=plastic)
37

48
Run websites as if they were apps.
59

data/meson.build

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
app_icon_dir = join_paths(datadir, 'icons', 'hicolor', 'scalable', 'apps')
2+
category_icon_dir = join_paths(datadir, 'icons', 'hicolor', 'scalable', 'categories')
3+
schema_dir = join_paths(datadir, 'glib-2.0', 'schemas')
4+
# message(f'Icon dir: @app_icon_dir@')
5+
# message(f'Schema dir: @schema_dir@')
6+
7+
# install icons
8+
install_emptydir(app_icon_dir)
9+
install_data(
10+
join_paths(meson.current_source_dir(), 'icons', f'@[email protected]'),
11+
install_dir: app_icon_dir,
12+
)
13+
14+
install_data(
15+
join_paths(meson.current_source_dir(), 'icons/categories/applications-webapps.svg'),
16+
install_dir: category_icon_dir,
17+
)
18+
19+
20+
# Install desktop file
21+
# desktop_file = i18n.merge_file(
22+
# input: 'webapp-manager.desktop.in',
23+
# output: 'webapp-manager.desktop',
24+
# type: 'desktop',
25+
# po_dir: '../po',
26+
# install: true,
27+
# install_dir: desktop_dir
28+
# )
29+
30+
# Install schema file
31+
schema_file = i18n.merge_file(
32+
input: 'org.x.webapp-manager.gschema.xml.in',
33+
output: 'org.x.webapp-manager.gschema.xml',
34+
type: 'xml',
35+
po_dir: '../po',
36+
install: true,
37+
install_dir: schema_dir
38+
)
39+
40+
compile_schemas = find_program('glib-compile-schemas', required: false)
41+
if compile_schemas.found()
42+
test('Validate schema file',
43+
compile_schemas,
44+
args: ['--strict', '--dry-run', meson.current_source_dir()])
45+
endif

debian/compat

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/control

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ Source: webapp-manager
22
Section: admin
33
Priority: optional
44
Maintainer: Linux Mint <[email protected]>
5-
Build-Depends: debhelper (>= 9)
6-
Standards-Version: 3.9.5
5+
Build-Depends: debhelper-compat (= 13),
6+
desktop-file-utils,
7+
dh-python,
8+
libglib2.0-bin,
9+
libgtk-4-bin,
10+
meson (>= 1.3.0),
11+
pkgconf,
12+
python3-all,
13+
Standards-Version: 4.6.1
714

815
Package: webapp-manager
916
Architecture: all
@@ -15,7 +22,8 @@ Depends: gir1.2-xapp-1.0 (>= 1.4),
1522
python3-pil,
1623
python3-setproctitle,
1724
python3-tldextract,
18-
xapps-common,
19-
${misc:Depends},
25+
xapps-common,,
26+
${python3:Depends},
27+
${misc:Depends}
2028
Description: Web Application Manager
2129
Launch websites as if they were apps.

debian/postinst

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
#!/bin/sh
2+
# postinst script for webapp-manager
3+
#
4+
# see: dh_installdeb(1)
5+
26
set -e
37

8+
49
case "$1" in
510
configure)
6-
if which glib-compile-schemas >/dev/null 2>&1
7-
then
8-
glib-compile-schemas /usr/share/glib-2.0/schemas
9-
fi
11+
if which glib-compile-schemas >/dev/null 2>&1
12+
then
13+
glib-compile-schemas /usr/share/glib-2.0/schemas
14+
fi
15+
if which gtk-update-icon-cache >/dev/null 2>&1
16+
then
17+
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
18+
fi
1019
;;
1120

1221
abort-upgrade|abort-remove|abort-deconfigure)
13-
1422
;;
1523

1624
*)
1725
echo "postinst called with unknown argument \`$1'" >&2
1826
exit 1
1927
;;
2028
esac
29+
30+
# dh_installdeb will replace this with shell code automatically
31+
# generated by other debhelper scripts.
32+
33+
#DEBHELPER#
34+
35+
exit 0

debian/postrm

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
# postrm script for webapp-manager
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
9+
case "$1" in
10+
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
11+
if which glib-compile-schemas >/dev/null 2>&1
12+
then
13+
glib-compile-schemas /usr/share/glib-2.0/schemas
14+
fi
15+
if which gtk-update-icon-cache >/dev/null 2>&1
16+
then
17+
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
18+
fi
19+
;;
20+
21+
*)
22+
echo "postrm called with unknown argument \`$1'" >&2
23+
exit 1
24+
;;
25+
esac
26+
27+
# dh_installdeb will replace this with shell code automatically
28+
# generated by other debhelper scripts.
29+
30+
#DEBHELPER#
31+
32+
exit 0

0 commit comments

Comments
 (0)