summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-05-19 17:05:11 +0800
committerLuke from DC <[email protected]>2023-05-23 03:04:29 +0000
commite4cdb9e1a846390bafef8e36085242f793464edd (patch)
tree668a8ff5d5d66d33db111d2e6cd3f72df16afaab /data
parent41a0cad8fafe515f56854462dd62c1b1bd94a393 (diff)
downloadengrampa-e4cdb9e1a846390bafef8e36085242f793464edd.tar.bz2
engrampa-e4cdb9e1a846390bafef8e36085242f793464edd.tar.xz
Add meson compilation support
Diffstat (limited to 'data')
-rw-r--r--data/icons/meson.build35
-rw-r--r--data/meson.build74
2 files changed, 109 insertions, 0 deletions
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..93c4a29
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,35 @@
+apps_icons = [
+ ['16x16', 'engrampa.png'],
+ ['22x22', 'engrampa.png'],
+ ['24x24', 'engrampa.png'],
+ ['32x32', 'engrampa.png'],
+]
+
+actions_icons = [
+ ['16x16', 'add-folder-to-archive.png', 'extract-archive.png', 'add-files-to-archive.png'],
+ ['24x24', 'add-folder-to-archive.png', 'extract-archive.png', 'add-files-to-archive.png'],
+]
+
+foreach icon: actions_icons
+ install_data(
+ join_paths(icon[0], 'actions', icon[1]),
+ install_dir: join_paths(get_option('prefix'), 'share/icons', 'hicolor', icon[0], 'actions')
+ )
+ install_data(
+ join_paths(icon[0], 'actions', icon[2]),
+ install_dir: join_paths(get_option('prefix'), 'share/icons', 'hicolor', icon[0], 'actions')
+ )
+ install_data(
+ join_paths(icon[0], 'actions', icon[3]),
+ install_dir: join_paths(get_option('prefix'), 'share/icons', 'hicolor', icon[0], 'actions')
+ )
+endforeach
+
+foreach icon: apps_icons
+ install_data(
+ join_paths(icon[0], 'apps', icon[1]),
+ install_dir: join_paths(get_option('prefix'), 'share/icons', 'hicolor', icon[0], 'apps')
+ )
+endforeach
+
+install_subdir('scalable', install_dir : join_paths(datadir, 'icons', 'hicolor'))
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..bde2aed
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,74 @@
+po_dir = join_paths(meson.source_root(), 'po')
+man1_dir = join_paths(engrampa_mandir, 'man1')
+
+schema_data = configuration_data()
+schema_data.set('GETTEXT_PACKAGE', meson.project_name())
+configure_file(
+ input : 'org.mate.engrampa.gschema.xml.in',
+ output : 'org.mate.engrampa.gschema.xml',
+ configuration : schema_data,
+ install : true,
+ install_dir : join_paths(datadir, 'glib-2.0', 'schemas')
+)
+
+install_data('packages.match',
+ install_dir : join_paths(datadir, meson.project_name())
+)
+
+install_data('engrampa.1',
+ install_dir : man1_dir
+)
+
+# .desktop file
+
+desktop_data = configuration_data()
+desktop_data.set('VERSION', meson.project_version())
+desktop_in_file = configure_file(
+ input : 'engrampa.desktop.in.in',
+ output : 'engrampa.desktop.in',
+ configuration : desktop_data
+)
+
+i18n.merge_file(
+ input : desktop_in_file,
+ output : 'engrampa.desktop',
+ type : 'desktop',
+ po_dir : po_dir,
+ install : true,
+ install_dir : join_paths(datadir, 'applications')
+)
+
+# .service files
+
+service_data = configuration_data()
+service_data.set('libexecdir', join_paths(prefix, get_option('libexecdir')))
+
+configure_file(
+ input : 'org.mate.Engrampa.service.in',
+ output : 'org.mate.Engrampa.service',
+ configuration : service_data,
+ install : true,
+ install_dir : join_paths(datadir, 'dbus-1/services')
+)
+
+# .appdata file
+
+appdata_data = configuration_data()
+appdata_data.set('PACKAGE_URL', 'https://mate-desktop.org')
+appdata_in_file = configure_file(
+ input : 'engrampa.appdata.xml.in.in',
+ output : 'engrampa.appdata.xml.in',
+ configuration : appdata_data
+)
+i18n.merge_file(
+ input : appdata_in_file,
+ output : 'engrampa.appdata.xml',
+ type : 'xml',
+ po_dir : po_dir,
+ install : true,
+ install_dir : join_paths(datadir, 'metainfo')
+)
+
+# Subdirectories
+
+subdir('icons')