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 URL: http://people.redhat.com/~rjones/virt-top/
15 BuildRequires: ocaml >= 3.10.2
16 BuildRequires: ocaml-findlib-devel
17 BuildRequires: ocaml-ocamldoc
18 ExcludeArch: sparc64 s390 s390x
19 # Need the ncurses / ncursesw (--enable-widec) fix.
20 BuildRequires: ocaml-calendar-devel
21 BuildRequires: ocaml-csv-devel
22 BuildRequires: ocaml-curses-devel >= 1.0.3-7
23 BuildRequires: ocaml-extlib-devel
24 #BuildRequires: ocaml-xml-light-devel # NOT IN PLD
25 # Need support for virDomainGetCPUStats (fixed in 0.6.1.2).
26 BuildRequires: ocaml-libvirt-devel >= 0.6.1.2-5
27 # Tortuous list of BRs for gettext.
28 BuildRequires: ocaml-fileutils-devel
29 BuildRequires: ocaml-gettext-devel >= 0.3.3
31 BuildRequires: gettext
34 BuildRequires: libvirt-devel
36 BuildRequires: perl(Pod::Perldoc)
38 BuildRequires: /usr/bin/execstack
42 virt-top is a 'top(1)'-like utility for showing stats of virtualized
43 domains. Many keys and command line options are the same as for
46 It uses libvirt so it is capable of showing stats across a variety of
47 different virtualization systems.
65 # Force rebuild of man page.
66 rm -f virt-top/virt-top.1
67 %{__make} -C virt-top virt-top.1
71 rm -rf $RPM_BUILD_ROOT
73 DESTDIR=$RPM_BUILD_ROOT
76 # Install translations.
77 install -d $RPM_BUILD_ROOT%{_localedir}
78 %{__make} -C po install \
79 PODIR=$RPM_BUILD_ROOT%{_localedir}
83 # Install virt-top manpage by hand for now.
84 install -d $RPM_BUILD_ROOT%{_mandir}/man1
85 cp -p virt-top/virt-top.1 $RPM_BUILD_ROOT%{_mandir}/man1
88 # Clear executable stack flag. Really this is a bug in the OCaml
89 # compiler on ppc, but it's simpler to just clear the bit here for all
91 # https://bugzilla.redhat.com/show_bug.cgi?id=605124
92 # http://caml.inria.fr/mantis/view.php?id=4564
93 execstack -c $RPM_BUILD_ROOT%{_bindir}/virt-top
97 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc README TODO ChangeLog
102 %attr(755,root,root) %{_bindir}/virt-top
103 %{_mandir}/man1/virt-top.1*