File cfe-profiler.spec of Package cfe-profiler

#
# spec file for package cfe-profiler
#
# Copyright (c) 2014 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/
#


Name:           cfe-profiler

# Yes, its not FHS conformant but in sync with cfengie documentation
%define         basedir   /var/%{name}
%define         workdir   %{basedir}

Summary:        A cfengine bundles profiler
License:        GPL-3.0+
Group:          Productivity/Networking/System
Version:        0.2
Release:        0
Url:            https://github.com/lpefferkorn/cfe-profiler
Source:         %{name}-%{version}.tar.gz
# wtf? SLE_11 does not honor rpmlintrc
%if 0%{?suse_version} <= 1130
BuildRequires:  -post-build-checks
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libpromises-devel < 3.7
BuildRequires:  libpromises-devel >= 3.5
Requires:       cfengine < 3.7
Requires:       cfengine >= 3.5

%description
Cfe-profiler is a CFEngine bundles profiler. It measures their execution time, helping you to find which bundles are the top time consumers.

If a bundle calls others bundles (through methods:), its total time will be the sum of all the called bundles.

%prep
%setup -q -n %{name}-%{version}

%build
CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %{__make} %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_libdir}/cfengine
%{__install} cfe_profiler35.so %{buildroot}%{_libdir}/cfengine/cfe_profiler.so

%files
%defattr(-,root,root)
%doc README.md
%doc ChangeLog
%{_libdir}/cfengine/cfe_profiler.so

%changelog
openSUSE Build Service is sponsored by