]> git.pld-linux.org Git - packages/atop.git/blobdiff - atop.spec
already uses python3
[packages/atop.git] / atop.spec
index eca49a0a98e121c06d88c13b414e54abe9b053eb..8dc96b14558a12a0ab8dab538aedac74518d50cb 100644 (file)
--- a/atop.spec
+++ b/atop.spec
@@ -1,14 +1,17 @@
+# 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:       1.20
+Version:       2.7.1
 Release:       1
 License:       GPL v2+
 Group:         Applications/System
-Source0:       http://www.atconsultancy.nl/atop/packages/%{name}-%{version}.tar.gz
-# Source0-md5: ca4c8f47532b25aa0afd7d1061a1ad11
-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,17 +34,25 @@ również które procesy są odpowiedzialne za generowane obciążenie
 %prep
 %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,%{_bindir}}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/default}
+
+%{__make} -j1 sysvinstall install \
+       INIPATH=/etc/rc.d/init.d \
+       DEFPATH=%{_sysconfdir}/sysconfig \
+       DESTDIR=$RPM_BUILD_ROOT
 
-install man/* $RPM_BUILD_ROOT%{_mandir}/man1/
-install atop $RPM_BUILD_ROOT%{_bindir}/atop
+# drop versioned links
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{atop,atopsar}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -50,4 +61,29 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHOR ChangeLog README
 %attr(755,root,root) %{_bindir}/atop
-%{_mandir}/man1/atop.1*
+%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
This page took 0.135662 seconds and 4 git commands to generate.