3 %bcond_without opt # build opt
5 %define debug_package %{nil}
6 Summary: Utility like top(1) for displaying virtualization stats
11 Group: Applications/System
12 Source0: http://people.redhat.com/~rjones/virt-top/files/%{name}-%{version}.tar.gz
13 # Source0-md5: cdb61d35e64c78720082d58f8edfb9da
14 Patch0: makefile_fix.patch
15 URL: http://people.redhat.com/~rjones/virt-top/
16 BuildRequires: ocaml >= 3.10.2
17 BuildRequires: ocaml-findlib-devel
18 BuildRequires: ocaml-ocamldoc-devel
19 ExcludeArch: sparc64 s390 s390x
20 # Need the ncurses / ncursesw (--enable-widec) fix.
21 BuildRequires: ocaml-calendar-devel
22 BuildRequires: ocaml-csv-devel
23 BuildRequires: ocaml-curses-devel >= 1.0.3-7
24 BuildRequires: ocaml-extlib-devel
25 #BuildRequires: ocaml-xml-light-devel # NOT IN PLD
26 # Need support for virDomainGetCPUStats (fixed in 0.6.1.2).
27 BuildRequires: ocaml-libvirt-devel >= 0.6.1.2-5
28 # Tortuous list of BRs for gettext.
29 BuildRequires: ocaml-fileutils-devel
30 BuildRequires: ocaml-gettext-devel
32 BuildRequires: gettext
35 BuildRequires: libvirt-devel
37 BuildRequires: perl(Pod::Perldoc)
39 BuildRequires: /usr/bin/execstack
43 virt-top is a 'top(1)'-like utility for showing stats of virtualized
44 domains. Many keys and command line options are the same as for
47 It uses libvirt so it is capable of showing stats across a variety of
48 different virtualization systems.
67 # Force rebuild of man page.
68 rm -f virt-top/virt-top.1
69 %{__make} -C virt-top virt-top.1
73 rm -rf $RPM_BUILD_ROOT
75 DESTDIR=$RPM_BUILD_ROOT
78 # Install translations.
79 install -d $RPM_BUILD_ROOT%{_localedir}
80 %{__make} -C po install \
81 PODIR=$RPM_BUILD_ROOT%{_localedir}
85 # Install virt-top manpage by hand for now.
86 install -d $RPM_BUILD_ROOT%{_mandir}/man1
87 cp -p virt-top/virt-top.1 $RPM_BUILD_ROOT%{_mandir}/man1
90 # Clear executable stack flag. Really this is a bug in the OCaml
91 # compiler on ppc, but it's simpler to just clear the bit here for all
93 # https://bugzilla.redhat.com/show_bug.cgi?id=605124
94 # http://caml.inria.fr/mantis/view.php?id=4564
95 execstack -c $RPM_BUILD_ROOT%{_bindir}/virt-top
99 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc README TODO ChangeLog
104 %attr(755,root,root) %{_bindir}/virt-top
105 %{_mandir}/man1/virt-top.1*