File collectl.spec of Package collectl

# spec file for package collectl
# 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

Name:           collectl
Summary:        Collects data that describes the current system status
License:        Artistic-1.0 and GPL-2.0+
Group:          System/Monitoring
Version:        3.7.4
Release:        0
Source0:        %name-%version.src.tar.gz
Source1:        collectl.service
Source2:        collectl.sysconfig
BuildRequires:  pkgconfig(systemd)
BuildArch:      noarch

Unlike most monitoring tools that either focus on a small set of
statistics, format their output in only one way, run either
interatively or as a daemon but not both, collectl tries to do it all.

%setup -q 


# Install collectl in /usr/bin and link it in /usr/sbin
install -m 755 -D %buildroot%_bindir/collectl
mkdir -p %buildroot/%_sbindir
ln -s  %_bindir/collectl %buildroot/%_sbindir/collectl
install -m 644 -D collectl.conf %buildroot/%_sysconfdir/collectl.conf
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -D %buildroot%_datadir/%name/
install -m 755 -D %{SOURCE1} %buildroot/%{_unitdir}/collectl.service
ln -sf /sbin/service %{buildroot}/usr/sbin/rccollectl
install -m 644 -D %{SOURCE2} %buildroot/var/adm/fillup-templates/sysconfig.collectl
install -m 644 -D man1/collectl.1 %buildroot%_mandir/man1/collectl.1 

%service_add_post %{name}.service

%service_del_preun %{name}.service

%service_del_postun %{name}.service 

%config(noreplace) %_sysconfdir/collectl.conf

openSUSE Build Service is sponsored by