From b9f701f4c8bbc502fd7d3c37cc999021658d7e76 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Tue, 21 Oct 2025 22:39:34 +0800 Subject: [PATCH] split out different sub packages so that gtk4 won't buildrequires itself --- sysprof.spec | 104 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 23 deletions(-) diff --git a/sysprof.spec b/sysprof.spec index 8867982..552cb9d 100644 --- a/sysprof.spec +++ b/sysprof.spec @@ -2,10 +2,10 @@ Name: sysprof Version: 3.48.0 -Release: 1 +Release: 2 Summary: A system-wide Linux profiler -License: GPLv3+ -URL: http://www.sysprof.com +License: GPL-3.0-or-later +URL: https://www.sysprof.com Source0: https://download.gnome.org/sources/sysprof/3.48/sysprof-%{version}.tar.xz BuildRequires: gcc @@ -25,18 +25,27 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libunwind-generic) BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(systemd) -BuildRequires: libappstream-glib desktop-file-utils +BuildRequires: /usr/bin/appstreamcli +BuildRequires: /usr/bin/desktop-file-validate Requires: glib2%{?_isa} >= %{glib2_version} Requires: hicolor-icon-theme Requires: %{name}-cli%{?_isa} = %{version}-%{release} Requires: libsysprof-ui%{?_isa} = %{version}-%{release} -Provides: %{name}-agent%{?_isa} = %{version}-%{release} - %description Sysprof is a sampling CPU profiler for Linux that collects accurate. +%package agent +Summary: Sysprof agent utility +Conflicts: %{name} < 3.48.0-2 +Conflicts: %{name}-cli < 3.48.0-2 + +%description agent +The %{name}-agent package contains the sysprof-agent program. It provides a P2P +D-Bus API to the process which can control subprocesses. It's used by IDE +tooling to have more control across container boundaries. + %package cli Summary: Sysprof command line utility Requires: kernel-tools @@ -44,27 +53,51 @@ Requires: kernel-tools %description cli The %{name}-cli package contains the sysprof-cli command line utility. +%package -n libsysprof +Summary: Sysprof libraries +Conflicts: %{name}-cli < 3.48.0-2 + +%description -n libsysprof +The libsysprof package contains the Sysprof libraries. + %package -n libsysprof-ui Summary: Sysprof UI library %description -n libsysprof-ui The libsysprof-ui package contains the Sysprof UI library. +%package capture-devel +Summary: Development files for sysprof-capture static library +License: BSD-2-Clause-Patent +Provides: sysprof-capture-static = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} +Conflicts: %{name}-devel < 3.48.0-2 + +%description capture-devel +The %{name}-capture-devel package contains the sysprof-capture static library and header files. + %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Provides: sysprof-capture-static = %{version}-%{release} +Requires: libsysprof%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package -n libsysprof-ui-devel +Summary: Development files for %{name} +Requires: libsysprof-ui%{?_isa} = %{version}-%{release} +Conflicts: %{name}-devel < 3.48.0-2 + +%description -n libsysprof-ui-devel +The libsysprof-ui-devel package contains libraries and header files for +developing applications that use libsysprof-ui. + %package_help %prep %autosetup -p1 - %build %meson %meson_build @@ -73,29 +106,41 @@ developing applications that use %{name}. %meson_install %find_lang %{name} --with-gnome +# distinguish header files of libsysprof-capture and libsysprof +for file in src/libsysprof-capture/*.h +do + filename=`basename $file` + [ -f %{buildroot}%{_includedir}/sysprof-4/$filename ] && echo "%{_includedir}/sysprof-4/$filename" >> libsysprof-capture-headers.list +done + +for file in %{buildroot}%{_includedir}/sysprof-4/*.h +do + filename=`basename $file` + grep -v $filename libsysprof-capture-headers.list && echo "%{_includedir}/sysprof-4/$filename" >> libsysprof-headers.list +done + %check -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml +appstreamcli validate --pedantic --no-net %{buildroot}%{_datadir}/metainfo/*.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files %license COPYING %doc NEWS AUTHORS %{_bindir}/sysprof -%{_bindir}/sysprof-agent %{_datadir}/applications/org.gnome.Sysprof.desktop -#%%{_datadir}/glib-2.0/schemas/org.gnome.sysprof3.gschema.xml %{_datadir}/icons/hicolor/*/*/* %{_datadir}/metainfo/org.gnome.Sysprof.appdata.xml %{_datadir}/mime/packages/sysprof-mime.xml +%files agent +%license COPYING +%{_bindir}/sysprof-agent +%{_datadir}/dbus-1/interfaces/org.gnome.Sysprof.Agent.xml + %files cli -f %{name}.lang %license COPYING %{_bindir}/sysprof-cli -%{_libdir}/libsysprof-4.so -%{_libdir}/libsysprof-memory-4.so -%{_libdir}/libsysprof-speedtrack-4.so %{_libexecdir}/sysprofd -%{_datadir}/dbus-1/interfaces/org.gnome.Sysprof.Agent.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof2.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof3.Profiler.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof3.Service.xml @@ -107,24 +152,37 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_unitdir}/sysprof2.service %{_unitdir}/sysprof3.service +%files -n libsysprof +%license COPYING COPYING.gpl-2 +%{_libdir}/libsysprof-4.so +%{_libdir}/libsysprof-memory-4.so +%{_libdir}/libsysprof-speedtrack-4.so + %files -n libsysprof-ui -%license COPYING +%license COPYING COPYING.gpl-2 %{_libdir}/libsysprof-ui-5.so -%files devel +%files capture-devel -f libsysprof-capture-headers.list %license src/libsysprof-capture/COPYING -%{_includedir}/sysprof-4/ -%{_includedir}/sysprof-ui-5/ -%{_libdir}/pkgconfig/sysprof-4.pc +%dir %{_includedir}/sysprof-4 +%{_libdir}/libsysprof-capture-4.a %{_libdir}/pkgconfig/sysprof-capture-4.pc -#%%{_libdir}/pkgconfig/sysprof-ui-4.pc + +%files devel -f libsysprof-headers.list +%dir %{_includedir}/sysprof-4/ +%{_libdir}/pkgconfig/sysprof-4.pc + +%files -n libsysprof-ui-devel +%{_includedir}/sysprof-ui-5/ %{_libdir}/pkgconfig/sysprof-ui-5.pc -%{_libdir}/libsysprof-capture-4.a %files help %doc README.md %changelog +* Fri Oct 10 2025 Funda Wang - 3.48.0-2 +- split out different sub packages so that gtk4 won't buildrequires itself + * Fri Mar 01 2024 wangqia - 3.48.0-1 - Update to version 3.48.0 -- Gitee