Accepting request 1003584 from GNOME:Next

Suggestion on how to get out of our current problem v3

OBS-URL: https://build.opensuse.org/request/show/1003584
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/ghex?expand=0&rev=72
This commit is contained in:
Bjørn Lie 2022-09-15 20:45:32 +00:00 committed by Git OBS Bridge
parent c52e3c3979
commit 1d110c32cc
2 changed files with 28 additions and 19 deletions

View File

@ -1,9 +1,14 @@
-------------------------------------------------------------------
Fri Aug 5 08:26:11 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
- Add so_ver_ext define and set to 1 following upstream changes.
Further, add a soname define, and set it to
libgtkhex-%%{so_ver}-%%{so_ver_ext}, ease future updates.
- Add ghex_abi and so_ver_ext define and set to 4 and 0 following
upstream changes and set so_ver define to 1. Further, add a
soname define, and set it to libgtkhex-%%{ghex_abi}-%%{so_ver},
ease future updates.
- Move gtkhex-*/*.so to main package, and obsolete older versions
of libgtkhex-* from the same. These private so files (plugins)
should never have been packaged in the shared library package, so
now we have to clean up our previous sins.
-------------------------------------------------------------------
Thu Jul 7 13:30:03 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -16,9 +16,10 @@
#
%define so_ver 4
%define so_ver_ext 1
%define soname libgtkhex-%{so_ver}-%{so_ver_ext}
%define ghex_abi 4
%define so_ver 1
%define so_ver_ext 0
%define soname libgtkhex-%{ghex_abi}-%{so_ver}
Name: ghex
Version: 43.alpha
@ -41,6 +42,8 @@ BuildRequires: pkgconfig(gio-2.0) >= 2.31.10
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(libadwaita-1)
# Obsoletes libgtkhex-4-0 can be dropped when SLED/Leap 15.5 is out of support
Obsoletes: libgtkhex-4-0 < %{version}
%description
GHex allows the user to load data from any file and to view and edit it
@ -66,11 +69,11 @@ GHex allows the user to load data from any file and to view and edit it
in either hex or ASCII. It is a must for anyone playing games that use
a non-ASCII format for saving.
%package -n typelib-1_0-Hex-%{so_ver}
%package -n typelib-1_0-Hex-%{ghex_abi}
Summary: Introspection bindings for ghex
Group: System/Libraries
%description -n typelib-1_0-Hex-%{so_ver}
%description -n typelib-1_0-Hex-%{ghex_abi}
This package provides introspection bindings for ghex.
%lang_package
@ -86,7 +89,7 @@ This package provides introspection bindings for ghex.
%meson_install
%suse_update_desktop_file -r org.gnome.GHex GNOME Utility Editor
%find_lang %{name} ghex-%{so_ver}-%{so_ver_ext}.0.lang %{?no_lang_C}
%find_lang %{name} ghex-%{ghex_abi}-%{so_ver}.%{so_ver_ext}.lang %{?no_lang_C}
%fdupes -s %{buildroot}%{_datadir}
%ldconfig_scriptlets -n %{soname}
@ -101,21 +104,22 @@ This package provides introspection bindings for ghex.
%{_datadir}/glib-2.0/schemas/org.gnome.GHex.gschema.xml
%{_datadir}/icons/hicolor/*/apps/org.gnome.GHex*
%{_datadir}/icons/hicolor/scalable/actions/document-modified-symbolic.svg
# Not split out as they are private to ghex
%dir %{_libdir}/gtkhex-%{ghex_abi}.%{so_ver_ext}
%{_libdir}/gtkhex-%{ghex_abi}.%{so_ver_ext}/*.so
%files -n %{soname}
%dir %{_libdir}/gtkhex-%{so_ver}.0
%{_libdir}/libgtkhex-%{so_ver}.so.*
%{_libdir}/gtkhex-%{so_ver}.0/*.so
%{_libdir}/libgtkhex-%{ghex_abi}.so.*
%files -n typelib-1_0-Hex-%{so_ver}
%{_libdir}/girepository-1.0/Hex-%{so_ver}.typelib
%files -n typelib-1_0-Hex-%{ghex_abi}
%{_libdir}/girepository-1.0/Hex-%{ghex_abi}.typelib
%files devel
%{_includedir}/gtkhex-%{so_ver}/
%{_libdir}/libgtkhex-%{so_ver}.so
%{_libdir}/pkgconfig/gtkhex-%{so_ver}.pc
%{_datadir}/gir-1.0/Hex-%{so_ver}.gir
%{_includedir}/gtkhex-%{ghex_abi}/
%{_libdir}/libgtkhex-%{ghex_abi}.so
%{_libdir}/pkgconfig/gtkhex-%{ghex_abi}.pc
%{_datadir}/gir-1.0/Hex-%{ghex_abi}.gir
%files lang -f %{name}-%{so_ver}-%{so_ver_ext}.0.lang
%files lang -f %{name}-%{ghex_abi}-%{so_ver}.%{so_ver_ext}.lang
%changelog