File killerd.spec of Package killerd
#
# spec file for package killerd
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: killerd
License: GPL-2.0+
Group: System/Daemons
Url: http://mj.ucw.cz/linux.shtml
AutoReqProv: on
Version: 1.1
Release: 101
Summary: Daemon for automatic killing of login shells
Source: %{name}-%{version}.tar.bz2
Source1: killerd
Patch: %{name}-%{version}-makefile.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
KillerD is a simple daemon for automatic killing of login shells with
idle time exceeding given limits, runaway processes and other system
hogs. Almost everything can be easily configured.
Authors:
--------
Martin Mares <mj@ucw.cz>
%prep
%setup -q
%patch
%build
make CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}"
%install
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/etc/init.d
make install SBINDIR=$RPM_BUILD_ROOT/%{_sbindir} CONFIGDIR=$RPM_BUILD_ROOT/%{_sysconfdir}
install -m 755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/killerd
ln -sf ../../etc/init.d/killerd $RPM_BUILD_ROOT/%{_sbindir}/rckillerd
%clean
rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root)
%doc ChangeLog
%config %{_sysconfdir}/killerd.conf
%config /etc/init.d/killerd
%{_sbindir}/rckillerd
%{_sbindir}/killerd
%changelog