Split out sysprof-cli and libsysprof-ui subpackages

This makes it possible to use /usr/bin/sysprof-cli without dragging in the
Sysprof GUI app, and also makes it possible for gnome-builder to use sysprof
libraries without dragging in the Sysprof GUI app.
This commit is contained in:
Kalev Lember 2016-09-21 20:06:37 +02:00
parent 259dc22468
commit aa8b4078bd

View File

@ -1,6 +1,6 @@
Name: sysprof
Version: 3.22.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A system-wide Linux profiler
License: GPLv3+
@ -16,6 +16,8 @@ BuildRequires: polkit-devel
BuildRequires: systemd-devel
Requires: hicolor-icon-theme
Requires: %{name}-cli%{?_isa} = %{version}-%{release}
Requires: libsysprof-ui%{?_isa} = %{version}-%{release}
%description
Sysprof is a sampling CPU profiler for Linux that collects accurate,
@ -23,6 +25,20 @@ high-precision data and provides efficient access to the sampled
calltrees.
%package cli
Summary: Sysprof command line utility
%description cli
The %{name}-cli package contains the sysprof-cli command line utility.
%package -n libsysprof-ui
Summary: Sysprof UI library
%description -n libsysprof-ui
The libsysprof-ui package contains the Sysprof UI library.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -52,11 +68,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
@ -65,24 +79,36 @@ fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%post cli -p /sbin/ldconfig
%postun cli -p /sbin/ldconfig
%files -f %{name}.lang
%post -n libsysprof-ui -p /sbin/ldconfig
%postun -n libsysprof-ui -p /sbin/ldconfig
%files
%license COPYING
%doc NEWS README TODO AUTHORS
%{_bindir}/sysprof
%{_bindir}/sysprof-cli
%{_libdir}/libsysprof-2.so
%{_libdir}/libsysprof-ui-2.so
%{_libexecdir}/sysprof/sysprofd
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/system.d/org.gnome.Sysprof2.conf
%{_datadir}/dbus-1/system-services/org.gnome.Sysprof2.service
%{_datadir}/glib-2.0/schemas/org.gnome.sysprof2.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mime/packages/sysprof-mime.xml
%files cli -f %{name}.lang
%license COPYING
%{_bindir}/sysprof-cli
%{_libdir}/libsysprof-2.so
%{_libexecdir}/sysprof/sysprofd
%{_datadir}/dbus-1/system.d/org.gnome.Sysprof2.conf
%{_datadir}/dbus-1/system-services/org.gnome.Sysprof2.service
%{_datadir}/polkit-1/actions/org.gnome.sysprof2.policy
%{_unitdir}/sysprof2.service
%files -n libsysprof-ui
%license COPYING
%{_libdir}/libsysprof-ui-2.so
%files devel
%{_includedir}/sysprof-2/
%{_libdir}/pkgconfig/sysprof-2.pc
@ -90,6 +116,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Wed Sep 21 2016 Kalev Lember <klember@redhat.com> - 3.22.0-2
- Split out sysprof-cli and libsysprof-ui subpackages
* Wed Sep 21 2016 Kalev Lember <klember@redhat.com> - 3.22.0-1
- Update to 3.22.0