File: rrdcollect.spec

package info (click to toggle)
rrdcollect 0.2.3-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 896 kB
  • ctags: 571
  • sloc: sh: 3,925; ansic: 2,217; lex: 170; yacc: 134; makefile: 131
file content (65 lines) | stat: -rw-r--r-- 1,575 bytes parent folder | download | duplicates (2)
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
65
%define initdir /etc/rc.d/init.d

Summary: Round-Robin Database Collecting Daemon
Name: rrdcollect
Version: 0.2.2
Release: 1
Group: System Environment/Daemons
Copyright: GPL
Source: http://prdownloads.sourceforge.net/prdownloads/%{name}/%{name}-%{version}.tar.gz
Requires: rrdtool
URL: http://rrdcollect.sourceforge.net/
Prereq: /sbin/chkconfig, initscripts >= 5.54
#BuildRequires: rrdtool
BuildRequires: pcre-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
RRDcollect is a daemon which polls ceratin files in /proc/
directory, gathering data and storing it inside RRDtool's
database files.  Being written in C should be both fast
and resources-friendly.  Supports both scanf(3)-style
pattern matches and perl compatible regular expressions.

%prep
%setup

%build
%configure
make

%install
%makeinstall

mkdir -p $RPM_BUILD_ROOT/%{initdir}
install -m 0755 doc/sample-rrdcollect.init $RPM_BUILD_ROOT/%{initdir}/rrdcollect

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add rrdcollect

%preun
if [ $1 = 0 ]; then
    /sbin/service rrdcollect stop > /dev/null 2>&1
    /sbin/chkconfig --del rrdcollect
fi

%postun
if [ "$1" -ge "1" ]; then
    /sbin/service rrdcollect condrestart > /dev/null 2>&1
fi

%files
%defattr(-,root,root)
%doc AUTHORS NEWS README
%attr(0644,root,root) %config(noreplace) /etc/rrdcollect.conf
%attr(0755,root,root) %{initdir}/rrdcollect
%{_mandir}/man5/rrdcollect.*
%{_mandir}/man8/rrdcollect.*
%{_sbindir}/rrdcollect

%changelog
* Sun Sep  2 2002 Dawid Kuroczko <qnex@knm.org.pl> 0.2
- Initial .spec file for rrdcollect-0.2