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