From dbaf97fbb567e674d0fd9dc0e38edca5dbaefb58 Mon Sep 17 00:00:00 2001 From: Lyes Saadi Date: Mon, 30 Aug 2021 14:05:31 +0200 Subject: Updated cambalache --- cambalache/appdata-metainfo.patch | 25 ---- cambalache/cambalache.spec | 35 ++--- cambalache/installation-changes.patch | 233 ---------------------------------- 3 files changed, 10 insertions(+), 283 deletions(-) delete mode 100644 cambalache/appdata-metainfo.patch delete mode 100644 cambalache/installation-changes.patch diff --git a/cambalache/appdata-metainfo.patch b/cambalache/appdata-metainfo.patch deleted file mode 100644 index c5d639b..0000000 --- a/cambalache/appdata-metainfo.patch +++ /dev/null @@ -1,25 +0,0 @@ -From df650340c40281240bfb49b110503f7145e2324a Mon Sep 17 00:00:00 2001 -From: Lyes Saadi -Date: Wed, 21 Jul 2021 18:52:10 +0100 -Subject: [PATCH 1/1] /usr/share/appdata -> /usr/share/metainfo - ---- - data/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/meson.build b/data/meson.build -index a6f838d..77ef82f 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -22,7 +22,7 @@ appstream_file = i18n.merge_file( - output: 'ar.xjuan.Cambalache.appdata.xml', - po_dir: '../po', - install: true, -- install_dir: join_paths(datadir, 'appdata') -+ install_dir: join_paths(datadir, 'metainfo') - ) - - desktop_file_validate = find_program('desktop-file-validate', required: false) --- -2.31.1 - diff --git a/cambalache/cambalache.spec b/cambalache/cambalache.spec index c798e94..bf1aeb6 100644 --- a/cambalache/cambalache.spec +++ b/cambalache/cambalache.spec @@ -1,10 +1,9 @@ %global forgeurl https://gitlab.gnome.org/jpu/cambalache -%global commit c91562afbdf460571c109441e38679e5eae3f977 %global uuid ar.xjuan.Cambalache Name: cambalache -Version: 0.6.0 +Version: 0.7.4 Release: %autorelease Summary: RAD tool for Gtk 4 & 3 with a clear MVC design and data model first philosophy BuildArch: noarch @@ -17,28 +16,22 @@ BuildArch: noarch License: LGPLv2 AND GPLv2 URL: %{forgeurl} Source0: %{forgesource} -Patch0: appdata-metainfo.patch -Patch1: installation-changes.patch BuildRequires: meson BuildRequires: gtk4-devel +BuildRequires: gtk3-devel BuildRequires: python3-devel BuildRequires: python3-gobject-devel +BuildRequires: python3-lxml +BuildRequires: webkit2gtk3 BuildRequires: desktop-file-utils BuildRequires: libappstream-glib -BuildRequires: git-core +Requires: gtk4 Requires: hicolor-icon-theme -Requires: merengue Requires: python3-lxml Requires: webkit2gtk3 - -%package -n merengue -Summary: %{summary} - -Requires: gtk4 Recommends: gtk3 -Requires: python3-gobject %global _description %{expand: @@ -51,11 +44,9 @@ the Gdk broadway backend.} %description %{_description} -%description -n merengue %{_description} - %prep -%forgeautosetup -S git +%forgeautosetup %build @@ -78,18 +69,12 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{uuid}.desktop %doc README.md %{_bindir}/%{name} %{python3_sitelib}/%{name}/ -%{python3_sitelib}/%{name}ui/ -%{_metainfodir}/%{uuid}.appdata.xml +%{_metainfodir}/%{uuid}.metainfo.xml %{_datadir}/applications/%{uuid}.desktop %{_datadir}/%{name}/ -%{_datadir}/%{name}ui/ -%{_datadir}/icons/hicolor/*/apps/*.svg - -%files -n merengue -%license COPYING -%{_bindir}/merengue -%{python3_sitelib}/merengue/ -%{_datadir}/merengue/ +%{_datadir}/glib-2.0/schemas/%{uuid}.gschema.xml +%{_datadir}/icons/hicolor/*/{apps,mimetypes}/*.svg +%{_datadir}/mime/packages/%{uuid}.mime.xml %changelog diff --git a/cambalache/installation-changes.patch b/cambalache/installation-changes.patch deleted file mode 100644 index 77f888f..0000000 --- a/cambalache/installation-changes.patch +++ /dev/null @@ -1,233 +0,0 @@ -From 16c43a33d67cdbf0be3569c2221b873c9df855f4 Mon Sep 17 00:00:00 2001 -From: Lyes Saadi -Date: Thu, 22 Jul 2021 01:21:41 +0100 -Subject: [PATCH 1/1] Conforming to distributions packaging requirements - -This introduces several changes to the installation scripts in -order to account for distributions' requirements (Fedora -specifically). This include the installation of python source -files alongside bytecode cache pyc files as well as the -installation of python files in the standard /usr/lib/python3.9/ -directory as python modules. ---- - cambalacheui/meson.build | 32 +++++++++++++++----------------- - merengue/merengue.in | 5 +---- - merengue/meson.build | 26 ++++++++++++-------------- - run-dev.py | 11 +++++------ - src/cambalache.in | 4 +--- - src/meson.build | 10 ++++------ - 6 files changed, 38 insertions(+), 50 deletions(-) - -diff --git a/cambalacheui/meson.build b/cambalacheui/meson.build -index 5ee9409..b97b173 100644 ---- a/cambalacheui/meson.build -+++ b/cambalacheui/meson.build -@@ -20,24 +20,22 @@ configure_file( - install_dir: moduledir - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- 'cmb_base.pyc', -- 'cmb_db.pyc', -- 'cmb_objects_base.pyc', -- 'cmb_tree_view.pyc', -- 'cmb_list_store.pyc', -- 'cmb_ui.pyc', -- 'cmb_property.pyc', -- 'cmb_layout_property.pyc', -- 'cmb_type_info.pyc', -- 'cmb_object.pyc', -- 'cmb_view.pyc', -- 'cmb_object_editor.pyc', -- 'cmb_project.pyc', -- 'cmb_signal_editor.pyc', -- '__init__.pyc' -+ 'cmb_base.py', -+ 'cmb_db.py', -+ 'cmb_objects_base.py', -+ 'cmb_tree_view.py', -+ 'cmb_list_store.py', -+ 'cmb_ui.py', -+ 'cmb_property.py', -+ 'cmb_layout_property.py', -+ 'cmb_type_info.py', -+ 'cmb_object.py', -+ 'cmb_view.py', -+ 'cmb_object_editor.py', -+ 'cmb_project.py', -+ 'cmb_signal_editor.py', -+ '__init__.py', - ], - install_dir: moduledir) - -diff --git a/merengue/merengue.in b/merengue/merengue.in -index 7a18d22..a04b010 100755 ---- a/merengue/merengue.in -+++ b/merengue/merengue.in -@@ -12,16 +12,13 @@ import gi - import sys - import signal - --pkgdatadir = '@pkgdatadir@' -- --sys.path.insert(1, pkgdatadir) - signal.signal(signal.SIGINT, signal.SIG_DFL) - - from gi.repository import GLib - - if __name__ == "__main__": - if len(sys.argv) != 2: -- print(f"Ussage: {sys.argv[0]} gtkversion", file=sys.stderr) -+ print(f"Usage: {sys.argv[0]} gtkversion", file=sys.stderr) - exit() - - version = sys.argv[1] -diff --git a/merengue/meson.build b/merengue/meson.build -index 05a244b..c7c63c1 100644 ---- a/merengue/meson.build -+++ b/merengue/meson.build -@@ -1,5 +1,5 @@ - pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'merengue') --moduledir = join_paths(pkgdatadir, 'merengue') -+moduledir = join_paths(get_option('prefix'), python_bin.get_install_dir(), 'merengue') - - gnome.compile_resources('merengue', - 'merengue.gresource.xml', -@@ -29,35 +29,33 @@ configure_file( - install_dir: get_option('bindir') - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- 'mrg_application.pyc', -- '__init__.pyc', -+ 'mrg_application.py', -+ '__init__.py', - ], - install_dir: moduledir - ) - - install_data([ -- 'controller/__init__.pyc', -- 'controller/mrg_controller.pyc', -- 'controller/mrg_controller_registry.pyc', -+ 'controller/__init__.py', -+ 'controller/mrg_controller.py', -+ 'controller/mrg_controller_registry.py', - ], - install_dir: join_paths(moduledir, 'controller') - ) - - install_data([ -- 'mrg_gtk/__init__.pyc', -- 'mrg_gtk/mrg_selection.pyc', -- 'mrg_gtk/mrg_gtk_widget.pyc', -- 'mrg_gtk/mrg_gtk_window.pyc', -+ 'mrg_gtk/__init__.py', -+ 'mrg_gtk/mrg_selection.py', -+ 'mrg_gtk/mrg_gtk_widget.py', -+ 'mrg_gtk/mrg_gtk_window.py', - ], - install_dir: join_paths(moduledir, 'mrg_gtk') - ) - - install_data([ -- 'utils/__init__.pyc', -- 'utils/utils.pyc', -+ 'utils/__init__.py', -+ 'utils/utils.py', - ], - install_dir: join_paths(moduledir, 'utils') - ) -diff --git a/run-dev.py b/run-dev.py -index b1c9bd2..57f0060 100755 ---- a/run-dev.py -+++ b/run-dev.py -@@ -7,7 +7,6 @@ - # This program 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; version 2 of the License. --# - # This program 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 -@@ -33,6 +32,7 @@ basedir = os.path.dirname(__file__) - sys.path.insert(1, basedir) - - os.environ['PATH'] = os.path.join(basedir, 'merengue') + ':' + os.environ.get('PATH') -+os.environ['PYTHONPATH'] = basedir + ':' + str(os.environ.get('PYTHONPATH') or '') - - glib_compile_resources = GLib.find_program_in_path ('glib-compile-resources') - -@@ -94,16 +94,15 @@ if __name__ == '__main__': - - # Create config files pointing to source directories - dev_config('cambalacheui/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('cambalacheui')}'") -+ f"VERSION = 'git'") - dev_config('merengue/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('merengue')}'") -+ f"VERSION = 'git'") - dev_config('src/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('src')}'") -+ f"VERSION = 'git'") - - # Create merengue bin script - configure_file('merengue/merengue.in', 'merengue/merengue', { -- 'PYTHON': GLib.find_program_in_path('python3'), -- 'pkgdatadir': os.path.abspath('.') -+ 'PYTHON': GLib.find_program_in_path('python3') - }) - os.chmod('merengue/merengue', stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC) - -diff --git a/src/cambalache.in b/src/cambalache.in -index c0adbf0..d85f13c 100755 ---- a/src/cambalache.in -+++ b/src/cambalache.in -@@ -11,12 +11,10 @@ import os - import sys - import signal - --pkgdatadir = '@pkgdatadir@' - localedir = '@localedir@' - --sys.path.insert(1, pkgdatadir) - signal.signal(signal.SIGINT, signal.SIG_DFL) --print(pkgdatadir, localedir) -+print(localedir) - - import locale - locale.bindtextdomain("cambalache", localedir) -diff --git a/src/meson.build b/src/meson.build -index 683cdff..81f3ea9 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -1,5 +1,5 @@ - pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'cambalache') --moduledir = join_paths(pkgdatadir, 'cambalache') -+moduledir = join_paths(get_option('prefix'), python_bin.get_install_dir(), 'cambalache') - - gnome.compile_resources('cambalache', - 'cambalache.gresource.xml', -@@ -30,12 +30,10 @@ configure_file( - install_dir: moduledir - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- '__init__.pyc', -- 'cmb_application.pyc', -- 'cmb_window.pyc' -+ '__init__.py', -+ 'cmb_application.py', -+ 'cmb_window.py', - ], - install_dir: moduledir) - --- -2.31.1 - -- cgit