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