File bootchart.spec of Package bootchart
#
# spec file for package bootchart
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
%define real_bootchart2_version 0.14.7
Name: bootchart
BuildRequires: python-devel
BuildRequires: fdupes
BuildRequires: systemd-rpm-macros
Requires: lsb-release
Requires: python-cairo
Requires: python-gtk
Url: https://github.com/mmeeks/bootchart
License: GPL-3.0+
Group: Development/Tools/Other
Summary: Boot Process Charting Application
Version: 2.%{real_bootchart2_version}
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: bootchart-%{real_bootchart2_version}.tar.gz
Patch: bootchart-let-RMP-strip-manpages.patch
%{?systemd_requires}
%description
bootchart2 instruments your boot process and provides a tool to render
a graph of what was happening during the boot process later.
%prep
%setup -q -n bootchart-%{real_bootchart2_version}
%patch -p1
%build
export EARLY_PREFIX=%_prefix
make CFLAGS="%optflags" %{?_smp_mflags}
%install
export PY_LIBDIR=%py_libdir
export PY_SITEDIR=%py_sitedir
export EARLY_PREFIX=%_prefix
export DOCDIR=%_docdir/%name
make install DESTDIR=%{buildroot}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbootchart2
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbootchart2-done
%fdupes -s %{buildroot}%{python_sitelib}
%pre
%service_add_pre bootchart2.service bootchart2-done.service bootchart2-done.timer
%post
%service_add_post bootchart2.service bootchart2-done.service bootchart2-done.timer
%preun
%service_del_preun bootchart2.service bootchart2-done.service bootchart2-done.timer
%postun
%service_del_postun bootchart2.service bootchart2-done.service bootchart2-done.timer
%files
%defattr(-,root,root)
%dir %{_libexecdir}/bootchart
%{_docdir}/*
%{_bindir}/pybootchartgui
%{_libexecdir}/bootchart/tmpfs
%{_libexecdir}/bootchart/bootchart-collector
%{_mandir}/man1/bootchart2.1.gz
%{_mandir}/man1/bootchartd.1.gz
%{_mandir}/man1/pybootchartgui.1.gz
%{_mandir}/man1/%{name}*
%{_sbindir}/bootchartd
%{_sbindir}/rcbootchart2
%{_sbindir}/rcbootchart2-done
%{_unitdir}/bootchart2*.service
%{_unitdir}/bootchart2-done.timer
%config(noreplace) /etc/bootchartd.conf
%py_sitedir/pybootchartgui
%changelog