Blame SPECS/virt-top.spec

f9c8aa
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
f9c8aa
%global debug_package %{nil}
f9c8aa
f9c8aa
Name:           virt-top
f9c8aa
Version:        1.0.8
f9c8aa
Release:        24%{?dist}
f9c8aa
Summary:        Utility like top(1) for displaying virtualization stats
f9c8aa
License:        GPLv2+
f9c8aa
f9c8aa
URL:            http://people.redhat.com/~rjones/virt-top/
f9c8aa
Source0:        http://people.redhat.com/~rjones/virt-top/files/%{name}-%{version}.tar.gz
f9c8aa
f9c8aa
ExcludeArch:    s390
f9c8aa
f9c8aa
%if 0%{?rhel} >= 6
f9c8aa
# Post-process output of CSV file (RHBZ#665817, RHBZ#912020).
f9c8aa
Source1:        processcsv.py
f9c8aa
Source2:        processcsv.py.pod
f9c8aa
f9c8aa
Patch0:         virt-top-1.0.4-processcsv-documentation.patch
f9c8aa
%endif
f9c8aa
f9c8aa
# All upstream patches since 1.0.8.
f9c8aa
Patch0001:      0001-Disable-warning-about-immutable-strings-for-OCaml-4..patch
f9c8aa
Patch0002:      0002-Move-upstream-translations-from-Tranifex-to-Zanata.patch
f9c8aa
Patch0003:      0003-Update-translations-from-Zanata.patch
f9c8aa
Patch0004:      0004-build-Add-g-flag-to-ocamlopt.patch
f9c8aa
Patch0005:      0005-Rename-source-directory-and-files.patch
f9c8aa
Patch0006:      0006-Enable-same-warnings-as-libguestfs.patch
f9c8aa
Patch0007:      0007-Remove-x-executable-permission-on-several-source-fil.patch
f9c8aa
Patch0008:      0008-Refresh-HACKING-file.patch
f9c8aa
Patch0009:      0009-Fix-po-POTFILES-for-new-location-of-source-files.patch
f9c8aa
Patch0010:      0010-Update-PO-files.patch
f9c8aa
Patch0011:      0011-Remove-support-for-OCaml-Calendar-v1.patch
f9c8aa
Patch0012:      0012-src-Fix-some-comments-which-referred-to-the-old-file.patch
f9c8aa
Patch0013:      0013-Split-up-huge-Top-module-into-smaller-modules.patch
f9c8aa
Patch0014:      0014-Move-block_in_bytes-entirely-to-the-presentation-lay.patch
f9c8aa
Patch0015:      0015-Remove-unused-variable-is_calendar2.patch
f9c8aa
Patch0016:      0016-Use-virConnectGetAllDomainStats-API-to-collect-domai.patch
f9c8aa
Patch0017:      0017-chmod-x-COPYING-files.patch
f9c8aa
f9c8aa
# Update configure for aarch64 (bz #926701)
f9c8aa
Patch9999:      virt-top-aarch64.patch
f9c8aa
f9c8aa
# The patches touch configure.ac:
f9c8aa
BuildRequires:  autoconf
f9c8aa
f9c8aa
BuildRequires:  ocaml >= 3.10.2
f9c8aa
BuildRequires:  ocaml-ocamldoc
f9c8aa
BuildRequires:  ocaml-findlib-devel
f9c8aa
# Need the ncurses / ncursesw (--enable-widec) fix.
f9c8aa
BuildRequires:  ocaml-curses-devel >= 1.0.3-7
f9c8aa
# Still doesn't pull in libcursesw.so unless we do:
f9c8aa
BuildRequires:  ncurses-devel
f9c8aa
BuildRequires:  ocaml-extlib-devel
f9c8aa
BuildRequires:  ocaml-xml-light-devel
f9c8aa
BuildRequires:  ocaml-csv-devel
f9c8aa
BuildRequires:  ocaml-calendar-devel
f9c8aa
# Need support for virDomainGetCPUStats (fixed in 0.6.1.2)
f9c8aa
# and virConnectGetAllDomainStats (post-0.6.1.4).
f9c8aa
BuildRequires:  ocaml-libvirt-devel >= 0.6.1.4-15
f9c8aa
f9c8aa
# Tortuous list of BRs for gettext.
f9c8aa
BuildRequires:  ocaml-gettext-devel >= 0.3.3
f9c8aa
BuildRequires:  ocaml-fileutils-devel
f9c8aa
# For msgfmt:
f9c8aa
BuildRequires:  gettext
f9c8aa
f9c8aa
# Non-OCaml BRs.
f9c8aa
BuildRequires:  libvirt-devel
f9c8aa
BuildRequires:  perl
f9c8aa
BuildRequires:  perl(Pod::Perldoc)
f9c8aa
BuildRequires:  gawk
f9c8aa
f9c8aa
%ifarch ppc
f9c8aa
BuildRequires:  /usr/bin/execstack
f9c8aa
%endif
f9c8aa
f9c8aa
f9c8aa
%description
f9c8aa
virt-top is a 'top(1)'-like utility for showing stats of virtualized
f9c8aa
domains.  Many keys and command line options are the same as for
f9c8aa
ordinary 'top'.
f9c8aa
f9c8aa
It uses libvirt so it is capable of showing stats across a variety of
f9c8aa
different virtualization systems.
f9c8aa
f9c8aa
f9c8aa
%prep
f9c8aa
%setup -q
f9c8aa
f9c8aa
%if 0%{?rhel} >= 6
f9c8aa
%patch0 -p1
f9c8aa
%endif
f9c8aa
f9c8aa
%patch0001 -p1
f9c8aa
%patch0002 -p1
f9c8aa
%patch0003 -p1
f9c8aa
%patch0004 -p1
f9c8aa
%patch0005 -p1
f9c8aa
%patch0006 -p1
f9c8aa
%patch0007 -p1
f9c8aa
%patch0008 -p1
f9c8aa
%patch0009 -p1
f9c8aa
%patch0010 -p1
f9c8aa
%patch0011 -p1
f9c8aa
%patch0012 -p1
f9c8aa
%patch0013 -p1
f9c8aa
%patch0014 -p1
f9c8aa
%patch0015 -p1
f9c8aa
%patch0016 -p1
f9c8aa
%patch0017 -p1
f9c8aa
f9c8aa
# Update configure for aarch64 (bz #926701)
f9c8aa
%patch9999 -p1
f9c8aa
autoconf
f9c8aa
f9c8aa
f9c8aa
%build
f9c8aa
%configure
f9c8aa
make all
f9c8aa
%if %opt
f9c8aa
make opt
f9c8aa
strip src/virt-top.opt
f9c8aa
%endif
f9c8aa
f9c8aa
# Build translations.
f9c8aa
make -C po
f9c8aa
f9c8aa
# Force rebuild of man page.
f9c8aa
rm -f src/virt-top.1
f9c8aa
make -C src virt-top.1
f9c8aa
f9c8aa
%if 0%{?rhel} >= 6
f9c8aa
# Build processcsv.py.1.
f9c8aa
pod2man -c "Virtualization Support" --release "%{name}-%{version}" \
f9c8aa
  %{SOURCE2} > processcsv.py.1
f9c8aa
%endif
f9c8aa
f9c8aa
f9c8aa
%install
f9c8aa
make DESTDIR=$RPM_BUILD_ROOT install
f9c8aa
f9c8aa
# Install translations.
f9c8aa
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale
f9c8aa
make -C po install PODIR="$RPM_BUILD_ROOT%{_datadir}/locale"
f9c8aa
%find_lang %{name}
f9c8aa
f9c8aa
# Install virt-top manpage by hand for now.
f9c8aa
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
f9c8aa
install -m 0644 src/virt-top.1 $RPM_BUILD_ROOT%{_mandir}/man1
f9c8aa
f9c8aa
%ifarch ppc
f9c8aa
# Clear executable stack flag.  This is a bug in the OCaml
f9c8aa
# compiler on ppc.
f9c8aa
# https://bugzilla.redhat.com/show_bug.cgi?id=605124
f9c8aa
# http://caml.inria.fr/mantis/view.php?id=4564
f9c8aa
execstack -c $RPM_BUILD_ROOT%{_bindir}/virt-top
f9c8aa
%endif
f9c8aa
f9c8aa
%if 0%{?rhel} >= 6
f9c8aa
# Install processcsv.py.
f9c8aa
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
f9c8aa
f9c8aa
# Install processcsv.py(1).
f9c8aa
install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/
f9c8aa
%endif
f9c8aa
f9c8aa
f9c8aa
%files -f %{name}.lang
f9c8aa
%doc COPYING README TODO ChangeLog
f9c8aa
%{_bindir}/virt-top
f9c8aa
%{_mandir}/man1/virt-top.1*
f9c8aa
%if 0%{?rhel} >= 6
f9c8aa
%{_bindir}/processcsv.py
f9c8aa
%{_mandir}/man1/processcsv.py.1*
f9c8aa
%endif
f9c8aa
f9c8aa
f9c8aa
%changelog
f9c8aa
* Fri Oct 20 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-24
f9c8aa
- Enable s390x architecture
f9c8aa
  resolves: rhbz#1483875
f9c8aa
f9c8aa
* Wed Mar 29 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-23
f9c8aa
- Use libvirt virConnectGetAllDomainStats API for better performance, accuracy
f9c8aa
- Include all changes from Fedora Rawhide
f9c8aa
  resolves: rhbz#1422795
f9c8aa
f9c8aa
* Wed Aug 20 2014 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-8
f9c8aa
- Explicitly BR ncurses-devel to pull in libcursesw.so.
f9c8aa
- Resolves: rhbz#1125708
f9c8aa
f9c8aa
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.8-7
f9c8aa
- Mass rebuild 2013-12-27
f9c8aa
f9c8aa
* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-6
f9c8aa
- Include processcsv.py script and man page, but on RHEL only
f9c8aa
  (RHBZ#665817, RHBZ#912020)
f9c8aa
- Clear executable stack flag on PPC, PPC64 (RHBZ#605124).
f9c8aa
f9c8aa
* Fri Jun 28 2013 Cole Robinson <crobinso@redhat.com> - 1.0.8-5
f9c8aa
- Update configure for aarch64 (bz #926701)
f9c8aa
f9c8aa
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-4
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f9c8aa
f9c8aa
* Fri Dec 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-3
f9c8aa
- Rebuild for OCaml 4.00.1.
f9c8aa
f9c8aa
* Fri Oct 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-2
f9c8aa
- New upstream version 1.0.8.
f9c8aa
- Requires tiny change to ocaml-libvirt, hence dep bump.
f9c8aa
- Clean up the spec file.
f9c8aa
- Remove explicit BR ocaml-camomile (not used AFAIK).
f9c8aa
f9c8aa
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-3
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f9c8aa
f9c8aa
* Fri Mar 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.7-2
f9c8aa
- Require fixed ocaml-libvirt.
f9c8aa
f9c8aa
* Tue Mar  6 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.7-1
f9c8aa
- New upstream version 1.0.7.
f9c8aa
- Includes true physical CPU reporting (when libvirt supports this).
f9c8aa
f9c8aa
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-2
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f9c8aa
f9c8aa
* Fri Aug 12 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0.6-1
f9c8aa
- New upstream version 1.0.6.
f9c8aa
f9c8aa
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f9c8aa
f9c8aa
* Thu Jan  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0.5-1
f9c8aa
- New upstream version 1.0.5.
f9c8aa
- Rebuild against OCaml 3.12.0.
f9c8aa
- Project website moved to people.redhat.com.
f9c8aa
- Remove upstream patches.
f9c8aa
f9c8aa
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-3
f9c8aa
- Force rebuild against latest ocaml-gettext 0.3.3 (RHBZ#508197#c10).
f9c8aa
f9c8aa
* Mon Oct  5 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-2
f9c8aa
- New upstream release 1.0.4.
f9c8aa
- Includes new translations (RHBZ#493799).
f9c8aa
- Overall hardware memory is now displayed in CSV file (RHBZ#521785).
f9c8aa
- Several fixes to Japanese support (RHBZ#508197).
f9c8aa
- Japanese PO file also has bogus plural forms.
f9c8aa
- Additional BR on gettext (for msgfmt).
f9c8aa
f9c8aa
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-5
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f9c8aa
f9c8aa
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
f9c8aa
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
f9c8aa
  (added sparc64 per request from the sparc maintainer)
f9c8aa
f9c8aa
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4
f9c8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f9c8aa
f9c8aa
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-3
f9c8aa
- Rebuild for OCaml 3.11.0+rc1.
f9c8aa
f9c8aa
* Tue Oct 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-2
f9c8aa
- Fix incorrect sources file.
f9c8aa
- Remove bogus Plural-Forms line from zh_CN PO file.
f9c8aa
f9c8aa
* Tue Oct 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
f9c8aa
- New upstream version 1.0.3.
f9c8aa
f9c8aa
* Mon May 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-2
f9c8aa
- Use RPM percent-configure.
f9c8aa
- Add list of BRs for gettext.
f9c8aa
- Use find_lang to find PO files.
f9c8aa
- Comment out the OCaml dependency generator.  Not a library so not
f9c8aa
  needed.
f9c8aa
f9c8aa
* Thu May  1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-1
f9c8aa
- New upstream release 1.0.1.
f9c8aa
- Don't BR ocaml-gettext-devel, it's not used at the moment.
f9c8aa
- Don't gzip the manpage, it happens automatically.
f9c8aa
- Add BR libvirt-devel.
f9c8aa
- Remove spurious executable bit on COPYING.
f9c8aa
f9c8aa
* Thu Apr 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-2
f9c8aa
- New upstream release 1.0.0.
f9c8aa
- Force rebuild of manpage.
f9c8aa
f9c8aa
* Tue Mar 18 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.1-1
f9c8aa
- New upstream release 0.4.1.1.
f9c8aa
- Move configure to build section.
f9c8aa
- Pass RPM_OPT_FLAGS.
f9c8aa
f9c8aa
* Tue Mar  4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-2
f9c8aa
- Fix source URL.
f9c8aa
- Install virt-df manpage.
f9c8aa
f9c8aa
* Tue Mar  4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-1
f9c8aa
- New upstream release 0.4.1.0.
f9c8aa
- Upstream now requires ocaml-dbus >= 0.06, ocaml-lablgtk >= 2.10.0,
f9c8aa
  ocaml-dbus-devel.
f9c8aa
- Enable virt-df.
f9c8aa
f9c8aa
* Sat Mar  1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-3
f9c8aa
- Rebuild for ppc64.
f9c8aa
f9c8aa
* Wed Feb 13 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-2
f9c8aa
- Add BR gtk2-devel
f9c8aa
f9c8aa
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-1
f9c8aa
- New upstream version 0.4.0.3.
f9c8aa
- Rebuild for OCaml 3.10.1.
f9c8aa
f9c8aa
* Tue Nov 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.4-1
f9c8aa
- New upstream release 0.3.3.4.
f9c8aa
- Upstream website is now http://libvirt.org/ocaml/
f9c8aa
f9c8aa
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-2
f9c8aa
- Mistake: BR is ocaml-calendar-devel.
f9c8aa
f9c8aa
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-1
f9c8aa
- New upstream release 0.3.3.0.
f9c8aa
- Added support for virt-df, but disabled it by default.
f9c8aa
- +BR ocaml-calendar.
f9c8aa
f9c8aa
* Mon Sep 24 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.8-1
f9c8aa
- New upstream release 0.3.2.8.
f9c8aa
f9c8aa
* Thu Sep 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.7-1
f9c8aa
- New upstream release 0.3.2.7.
f9c8aa
- Ship the upstream ChangeLog file.
f9c8aa
f9c8aa
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-2
f9c8aa
- Force dependency on ocaml >= 3.10.0-7 which has fixed requires/provides
f9c8aa
  scripts.
f9c8aa
f9c8aa
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-1
f9c8aa
- New upstream version 0.3.2.6.
f9c8aa
f9c8aa
* Wed Aug 29 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.5-1
f9c8aa
- New upstream version 0.3.2.5.
f9c8aa
- Keep TODO out of the main package, but add (renamed) TODO.libvirt and
f9c8aa
  TODO.virt-top to the devel and virt-top packages respectively.
f9c8aa
- Add BR gawk.
f9c8aa
f9c8aa
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.4-1
f9c8aa
- New upstream version 0.3.2.4.
f9c8aa
f9c8aa
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-2
f9c8aa
- build_* macros so we can choose what subpackages to build.
f9c8aa
f9c8aa
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-1
f9c8aa
- Upstream version 0.3.2.3.
f9c8aa
- Add missing BR libvirt-devel.
f9c8aa
f9c8aa
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.2-1
f9c8aa
- Upstream version 0.3.2.2.
f9c8aa
f9c8aa
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-2
f9c8aa
- Fix unclosed if-statement in spec file.
f9c8aa
f9c8aa
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-1
f9c8aa
- Upstream version 0.3.2.1.
f9c8aa
- Put HTML documentation in -devel package.
f9c8aa
f9c8aa
* Mon Aug  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.1.2-1
f9c8aa
- Initial RPM release.