From 1fe2f796658ee1e98d29b2f8bf6f07d676bfc5bd Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 14 May 2022 21:34:05 +0200 Subject: [PATCH] - updated to 0.3.0, added gtk4 packages - separated -headers so that gtk2 or gtk4 packages don't require gtk+3 based ones --- colord-gtk.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-) diff --git a/colord-gtk.spec b/colord-gtk.spec index 914b2a9..37fac88 100644 --- a/colord-gtk.spec +++ b/colord-gtk.spec @@ -3,18 +3,19 @@ %bcond_without apidocs # API documentation %bcond_without static_libs # static libraries %bcond_without gtk2 # additional GTK+ 2.x version of library +%bcond_without gtk4 # additional GTK 4 version of library %bcond_without vala # Vala API %define colord_ver 0.1.27 Summary: GTK helper library for colord Summary(pl.UTF-8): Biblioteka pomocniczna GTK dla colord Name: colord-gtk -Version: 0.2.0 +Version: 0.3.0 Release: 1 License: LGPL v2.1+ (library), GPL v2+ (cd-convert utility) Group: X11/Libraries Source0: https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz -# Source0-md5: 66d048803c8b89e5e63da4b461484933 +# Source0-md5: 08c245d6482b3923a2b6a09f7fbbe612 URL: https://www.freedesktop.org/software/colord/ BuildRequires: colord-devel >= %{colord_ver} BuildRequires: gettext-tools >= 0.17 @@ -23,6 +24,7 @@ BuildRequires: gobject-introspection-devel >= 0.9.8 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2.0} BuildRequires: gtk+3-devel >= 3.0 BuildRequires: gtk-doc >= 1.9 +%{?with_gtk4:BuildRequires: gtk4-devel >= 4.4} BuildRequires: lcms2-devel >= 2.2 BuildRequires: meson >= 0.46.0 BuildRequires: ninja >= 1.5 @@ -44,20 +46,36 @@ GTK helper library for colord. %description -l pl.UTF-8 Biblioteka pomocniczna GTK dla colord. +%package headers +Summary: Header files for colord-gtk libraries +Summary(pl.UTF-8): Pliki nagłówkowe bibliotek colord-gtk +Group: X11/Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: colord-devel >= %{colord_ver} +Requires: glib2-devel >= 1:2.28.0 +Conflicts: colord-gtk-devel < 0.3 + +%description headers +Header files for colord-gtk libraries. + +%description headers -l pl.UTF-8 +Pliki nagłówkowe bibliotek colord-gtk. + %package devel -Summary: Header files for colord-gtk library -Summary(pl.UTF-8): Pliki nagłówkowe biblioteki colord-gtk +Summary: Development files for colord-gtk library +Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk Group: X11/Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: %{name}-headers = %{version}-%{release} Requires: colord-devel >= %{colord_ver} Requires: glib2-devel >= 1:2.28.0 Requires: gtk+3-devel >= 3.0 %description devel -Header files for colord-gtk library. +Development files for colord-gtk library. %description devel -l pl.UTF-8 -Pliki nagłówkowe biblioteki colord-gtk. +Pliki programistyczne biblioteki colord-gtk. %package static Summary: Static colord-gtk library @@ -115,7 +133,7 @@ Biblioteka pomocniczna GTK 2 dla colord. Summary: Development files for colord-gtk2 library Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 Group: X11/Development/Libraries -Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-headers = %{version}-%{release} Requires: colord-gtk2 = %{version}-%{release} Requires: gtk+2-devel >= 2.0 @@ -137,6 +155,46 @@ Static colord-gtk2 library. %description -n colord-gtk2-static -l pl.UTF-8 Statyczna biblioteka colord-gtk2. +%package -n colord-gtk4 +Summary: GTK 4 helper library for colord +Summary(pl.UTF-8): Biblioteka pomocniczna GTK 4 dla colord +Group: X11/Libraries +Requires: colord-libs >= %{colord_ver} +Requires: glib2 >= 1:2.28.0 +Requires: gtk4 >= 4.4 + +%description -n colord-gtk4 +GTK 4 helper library for colord. + +%description -n colord-gtk4 -l pl.UTF-8 +Biblioteka pomocniczna GTK 4 dla colord. + +%package -n colord-gtk4-devel +Summary: Development files for colord-gtk4 library +Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk4 +Group: X11/Development/Libraries +Requires: %{name}-headers = %{version}-%{release} +Requires: colord-gtk4 = %{version}-%{release} +Requires: gtk4-devel >= 4.4 + +%description -n colord-gtk4-devel +Development files for colord-gtk4 library. + +%description -n colord-gtk4-devel -l pl.UTF-8 +Pliki programistyczne biblioteki colord-gtk4. + +%package -n colord-gtk4-static +Summary: Static colord-gtk4 library +Summary(pl.UTF-8): Statyczna biblioteka colord-gtk4 +Group: X11/Development/Libraries +Requires: colord-gtk4-devel = %{version}-%{release} + +%description -n colord-gtk4-static +Static colord-gtk4 library. + +%description -n colord-gtk4-static -l pl.UTF-8 +Statyczna biblioteka colord-gtk4. + %prep %setup -q @@ -147,6 +205,7 @@ Statyczna biblioteka colord-gtk2. %build %meson build \ -Dgtk2=true \ + %{!?with_gtk4:-Dgtk4=false} \ -Dvapi=true %ninja_build -C build @@ -179,11 +238,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib %{_mandir}/man1/cd-convert.1* -%files devel +%files headers %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libcolord-gtk.so %{_includedir}/colord-1/colord-gtk.h %{_includedir}/colord-1/colord-gtk + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libcolord-gtk.so %{_datadir}/gir-1.0/ColordGtk-1.0.gir %{_pkgconfigdir}/colord-gtk.pc @@ -223,3 +285,21 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libcolord-gtk2.a %endif %endif + +%if %{with gtk4} +%files -n colord-gtk4 +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libcolord-gtk4.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libcolord-gtk4.so.1 + +%files -n colord-gtk4-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libcolord-gtk4.so +%{_pkgconfigdir}/colord-gtk4.pc + +%if %{with static_libs} +%files -n colord-gtk4-static +%defattr(644,root,root,755) +%{_libdir}/libcolord-gtk4.a +%endif +%endif -- 2.44.0