File: and.spec

package info (click to toggle)
and 1.2.2-4.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 352 kB
  • ctags: 296
  • sloc: ansic: 1,198; sh: 253; makefile: 164
file content (64 lines) | stat: -rw-r--r-- 1,564 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Name:      and
Version:   1.2.0
Release:   1
Summary:   Auto nice daemon
Vendor:    Patrick Schemitz <schemitz@users.sourceforge.net>
Copyright: GPL
Group:     Daemons
Buildroot: /var/tmp/%{name}-buildroot
Source:    http://and.sourceforge.net/%{name}-%{version}.tar.gz
URL:       http://and.sourceforge.net
Prefix:    %{_prefix}
ExclusiveOS: linux

%description
The auto nice daemon renices and even kills jobs according to their CPU time,
owner, and command name. This is especially useful on production machines with
lots of concurrent CPU-intensive jobs and users that tend to forget to
nice their jobs.

%prep            
rm -rf %{buildroot}
%setup -q
make PREFIX=%{_prefix} \
     INSTALL_ETC=/etc \
     INSTALL_INITD= \
     INSTALL_SBIN=%{_sbindir} \
     INSTALL_MAN=%{_mandir}

%install
mkdir -p %{buildroot}/etc
mkdir -p %{buildroot}$initddir
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_mandir}/man8
mkdir -p %{buildroot}%{_mandir}/man5
make PREFIX=%{buildroot}%{_prefix} \
     INSTALL_ETC=%{buildroot}/etc \
     INSTALL_INITD= \
     INSTALL_SBIN=%{buildroot}%{_sbindir} \
     INSTALL_MAN=%{buildroot}%{_mandir} install 

%clean
rm -rf %{buildroot}

%pre

%post
initddir=`%{_sbindir}/and-find-init.d`
ln -sf %{_sbindir}/and.init $initddir/and
/sbin/chkconfig --add and

%preun
%{_sbindir}/and.init stop > /dev/null 2>&1 
/sbin/chkconfig --del and
initddir=`%{_sbindir}/and-find-init.d`
rm -f $initddir/and

%postun

%files
%defattr(-,root,root)
%doc README LICENSE CHANGELOG
%config(noreplace)  /etc/and.*
%{_sbindir}/*
%{_mandir}/*/*