File sysprof.spec of Package sysprof

#
# spec file for package sysprof
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 Bjørn Lie, Bryne, Norway.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           sysprof
Version:        3.26.1
Release:        0
Summary:        A system-wide Linux profiler
License:        GPL-3.0+
Group:          Development/Tools/Debuggers
Url:            http://www.sysprof.com
Source0:        http://download.gnome.org/sources/sysprof/3.26/%{name}-%{version}.tar.xz
BuildRequires:  binutils-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  gobject-introspection-devel
BuildRequires:  itstool
BuildRequires:  libxml2-tools
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gio-2.0) >= 2.44.0
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.44.0
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.21.5
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(polkit-gobject-1)
Requires:       hicolor-icon-theme
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Sysprof is a sampling CPU profiler for Linux that collects accurate,
high-precision data and provides efficient access to the sampled
calltrees.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Tools/Debuggers
Requires:       %{name} = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%lang_package

%prep
%setup -q

%build
%configure --disable-static --disable-Werror
make %{?_smp_mflags}

%install
%make_install DESTDIR=%{buildroot} %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file org.gnome.Sysprof2 Profiling

%pre
%service_add_pre sysprof2.service

%preun
%service_del_preun sysprof2.service

%post
/sbin/ldconfig
%desktop_database_post
%icon_theme_cache_post
%service_add_post sysprof2.service

%postun
/sbin/ldconfig
%desktop_database_postun
%icon_theme_cache_postun
%service_del_postun sysprof2.service

%files
%defattr(-,root,root)
%doc README COPYING NEWS TODO AUTHORS
%{_bindir}/sysprof
%{_bindir}/sysprof-cli
%{_libdir}/libsysprof-2.so
%{_libdir}/libsysprof-ui-2.so
%dir %{_libexecdir}/sysprof
%{_libexecdir}/sysprof/sysprofd
%{_datadir}/appdata/org.gnome.Sysprof2.appdata.xml
%{_datadir}/applications/*.desktop
%dir %{_datadir}/dbus-1/system.d
%{_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
%{_datadir}/polkit-1/actions/org.gnome.sysprof2.policy
%{_unitdir}/sysprof2.service
%dir %{_datadir}/help/C/sysprof
%{_datadir}/help/C/sysprof/*

%files devel
%defattr(-,root,root)
%{_includedir}/sysprof-2/
%{_libdir}/pkgconfig/sysprof-2.pc
%{_libdir}/pkgconfig/sysprof-ui-2.pc

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by