[planner: 29/40] build: Implement gconf schema translation and installation
- From: Mart Raudsepp <mraudsepp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planner: 29/40] build: Implement gconf schema translation and installation
- Date: Thu, 3 Jun 2021 16:28:56 +0000 (UTC)
commit c0ec73a1b43991d802f642aee0689540079bae9c
Author: Mart Raudsepp <leio gentoo org>
Date: Wed Mar 4 19:35:51 2020 +0200
build: Implement gconf schema translation and installation
data/meson.build | 22 ++++++++++++++++++++++
data/meson_gconf.py | 28 ++++++++++++++++++++++++++++
meson.build | 1 +
3 files changed, 51 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index f313dfda..7e5ce63f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -14,3 +14,25 @@ i18n.merge_file(
install: true,
install_dir: planner_datadir / 'applications',
)
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = po_dir / '.intltool-merge-cache'
+intltool_schema_cmd = [intltool_merge, '-s', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+gconfschemadir = planner_sysconfdir / 'gconf' / 'schemas'
+schema_file = 'planner.schemas'
+
+custom_target(
+ schema_file,
+ input: schema_file + '.in',
+ output: schema_file,
+ command: intltool_schema_cmd,
+ install: true,
+ install_dir: gconfschemadir,
+)
+
+meson.add_install_script(
+ 'meson_gconf.py',
+ gconfschemadir,
+ schema_file,
+)
diff --git a/data/meson_gconf.py b/data/meson_gconf.py
new file mode 100755
index 00000000..e3b9d96c
--- /dev/null
+++ b/data/meson_gconf.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see <https://www.gnu.org/licenses/>.
+
+import os
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ sys.exit(0)
+
+prefix = os.environ['MESON_INSTALL_PREFIX']
+schemasdir = os.path.join(prefix, sys.argv[1])
+
+rv = subprocess.call(['gconftool-2', '--install-schema-file', os.path.join(schemasdir, sys.argv[2])])
+sys.exit(rv)
diff --git a/meson.build b/meson.build
index b42be87d..9726c0c0 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,7 @@ planner_filemoduledir = planner_pkglibdir / 'file-modules'
planner_datadir = planner_prefix / get_option('datadir')
planner_pkgdatadir = planner_datadir / 'planner'
planner_localedir = planner_prefix / get_option('localedir')
+planner_sysconfdir = get_option('sysconfdir')
po_dir = meson.source_root() / 'po'
cc = meson.get_compiler('c')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]