]> git.pld-linux.org Git - packages/atsar.git/blob - atsar.spec
- use %service
[packages/atsar.git] / atsar.spec
1 Summary:        AT Computing System Activity Report - a sar clone for Linux
2 Summary(pl):    Atsar - odpowiednik uniksowego programu sar dla Linuksa
3 Name:           atsar
4 Version:        1.7
5 Release:        2
6 License:        GPL
7 Group:          Daemons
8 Source0:        ftp://ftp.atcomputing.nl/pub/tools/linux/%{name}_linux-%{version}.tar.gz
9 # Source0-md5:  2aa73a4a99dd176a02c5336889d8b028
10 Source1:        %{name}.init
11 Source2:        %{name}.cron
12 Patch0:         %{name}-runfrompath.patch
13 URL:            ftp://ftp.atcomputing.nl/pub/tools/linux/
14 BuildRequires:  rpmbuild(macros) >= 1.268
15 Requires(post,preun):   /sbin/chkconfig
16 Requires:       rc-scripts
17 ExclusiveOS:    Linux
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Atsar can be used to measure the load on the most relevant system
22 resources, such as CPU, disk, memory and network. Long-term analysis
23 can be done via cron, by maintaining log files with statistical
24 information. Short-term analysis can be done by starting the command
25 atsar with an interval and a number of samples. The current version of
26 atsar gathers statistics about the utilization of CPU's, disks, memory
27 and swap, serial lines and network (TCP/IP v4 and v6).
28
29 %description -l pl
30 Atsar przydaje siê do pomiarów obci±¿enia najbardziej istotnych
31 zasobów systemowych, takich jak procesor, dysk, pamiêæ i sieæ. Dziêki
32 po³±czeniu z cronem mo¿liwe jest otrzymanie logów z informacj±
33 statystyczn±, przydatnych do d³ugoterminowych analiz. Krótkoterminowe
34 analizy mog± byæ wykonywane przez bezpo¶rednie uruchomienie programu
35 atsar z podaniem parametrów takich jak ilo¶æ próbek i odstêp czasowy
36 miêdzy próbkami. Aktualna wersja programu atsar gromadzi informacje o
37 wykorzystaniu procesora, dysków, pamiêci (operacyjnej i wymiany),
38 ³±czy szeregowych i sieci (TCP/IP v4 i v6).
39
40 %prep
41 %setup -q -n %{name}_linux-%{version}
42 %patch -p1
43
44 %build
45 for r in atsar atsadc \*.o ;do
46         find -iname $r -exec rm -v {} \;
47 done
48 %{__make}
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/log/atsar} \
53         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d}
54
55 for s in scripts/atsa1 atsar_linux.conf ;do
56         cat $s | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$
57         mv -f sed.$$ $s
58 done
59
60 install atsar/atsar atsadc/atsadc scripts/atsa1 \
61         scripts/atsaftp scripts/atsahttp $RPM_BUILD_ROOT%{_bindir}
62 install man/* $RPM_BUILD_ROOT%{_mandir}/man1
63
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/atsar
65 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/atsar
66 install atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %post
72 %{_bindir}/atsa1
73 %service atsar restart
74
75 %preun
76 if [ "$1" = "0" ]; then
77         %service atsar stop
78         /sbin/chkconfig --del atsar
79 fi
80
81 %files
82 %defattr(644,root,root,755)
83 %doc README
84 %attr(755,root,root) %{_bindir}/atsar
85 %attr(755,root,root) %{_bindir}/atsadc
86 %attr(755,root,root) %{_bindir}/atsa1
87 %attr(755,root,root) %{_bindir}/atsaftp
88 %attr(755,root,root) %{_bindir}/atsahttp
89 %{_mandir}/man1/atsar.1*
90 %{_mandir}/man1/atsadc.1*
91 %dir /var/log/atsar
92 %attr(754,root,root) %config /etc/rc.d/init.d/atsar
93 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/atsar
94 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/atsar.conf
This page took 0.056687 seconds and 3 git commands to generate.