X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=atop.spec;h=8dc96b14558a12a0ab8dab538aedac74518d50cb;hb=HEAD;hp=f2d067c4e847fd97e9f23fce9a37fc0fc9f8b325;hpb=bda29495b001852286595bcea5c27fa0ec767cd4;p=packages%2Fatop.git diff --git a/atop.spec b/atop.spec index f2d067c..8dc96b1 100644 --- a/atop.spec +++ b/atop.spec @@ -1,16 +1,17 @@ -%define subver 1 - +# TODO +# - initscripts, logs, crons (see rpm files section at bottom of the spec) Summary: AT Computing System and Process Monitor Summary(pl.UTF-8): Monitor obciążenia systemu alternatywny dla programu top Name: atop -Version: 2.0 +Version: 2.7.1 Release: 1 License: GPL v2+ Group: Applications/System -Source0: http://www.atoptool.nl/download/%{name}-%{version}-%{subver}.tar.gz -# Source0-md5: 6867ea2211edaf8140b94130470d646b -URL: http://www.atcomputing.nl/Tools/atop +Source0: http://www.atoptool.nl/download/%{name}-%{version}.tar.gz +# Source0-md5: 25b41209435da224e4509dcc12bba328 +URL: https://www.atoptool.nl/ BuildRequires: ncurses-devel +BuildRequires: sed >= 4.0 BuildRequires: zlib-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -31,20 +32,27 @@ również które procesy są odpowiedzialne za generowane obciążenie (znów: na poziomie procesora, pamięci, dysków czy sieci). %prep -%setup -q -n %{name}-%{version}-%{subver} +%setup -q + +%{__sed} -i -e '/chown root/d' Makefile %build %{__make} \ CC="%{__cc}" \ - CFLAGS="-I/usr/include/ncurses %{rpmcflags}" + LDFLAGS="%{rpmldflags}" \ + CFLAGS="%{rpmcppflags} %{rpmcflags}" %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_mandir}/{man1,man5},%{_bindir}} +install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/default} -install man/*.1* $RPM_BUILD_ROOT%{_mandir}/man1/ -install man/*.5* $RPM_BUILD_ROOT%{_mandir}/man5/ -install atop $RPM_BUILD_ROOT%{_bindir}/atop +%{__make} -j1 sysvinstall install \ + INIPATH=/etc/rc.d/init.d \ + DEFPATH=%{_sysconfdir}/sysconfig \ + DESTDIR=$RPM_BUILD_ROOT + +# drop versioned links +%{__rm} $RPM_BUILD_ROOT%{_bindir}/{atop,atopsar}-%{version} %clean rm -rf $RPM_BUILD_ROOT @@ -53,5 +61,29 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHOR ChangeLog README %attr(755,root,root) %{_bindir}/atop +%attr(755,root,root) %{_bindir}/atopcat +%attr(755,root,root) %{_bindir}/atopconvert +%attr(755,root,root) %{_bindir}/atopsar +%attr(755,root,root) %{_sbindir}/atopacctd +%attr(755,root,root) %{_sbindir}/atopgpud %{_mandir}/man1/atop*.1* %{_mandir}/man5/atoprc*.5* +%{_mandir}/man8/atopacctd.8* +%{_mandir}/man8/atopgpud.8* + +# review and package these: +# don't forget R: procps, find, etc what they use +%if 0 +%dir %{_sysconfdir}/%{name} +# atop.daily - invoked from cron, move to %{_prefix}/lib instead? +%attr(755,root,root) %{_sysconfdir}/%{name}/atop.daily +%attr(754,root,root) /etc/rc.d/init.d/atop +%attr(754,root,root) /etc/rc.d/init.d/atopacct +%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/atop +%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/psaccs_atop +%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/psaccu_atop +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/atop +%dir /var/log/atop +%ghost /var/log/atop/dummy_after +%ghost /var/log/atop/dummy_before +%endif