]> git.pld-linux.org Git - packages/virt-top.git/blob - virt-top.spec
rel 2; fix build
[packages/virt-top.git] / virt-top.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define debug_package %{nil}
6 Summary:        Utility like top(1) for displaying virtualization stats
7 Name:           virt-top
8 Version:        1.0.8
9 Release:        2
10 License:        GPL v2+
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
31 # For msgfmt:
32 BuildRequires:  gettext
33 # Non-OCaml BRs.
34 BuildRequires:  gawk
35 BuildRequires:  libvirt-devel
36 BuildRequires:  perl
37 BuildRequires:  perl(Pod::Perldoc)
38 %ifarch ppc ppc64
39 BuildRequires:  /usr/bin/execstack
40 %endif
41
42 %description
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
45 ordinary 'top'.
46
47 It uses libvirt so it is capable of showing stats across a variety of
48 different virtualization systems.
49
50 %prep
51 %setup -q
52 %patch0 -p1
53
54 chmod -x COPYING
55
56 %build
57 %configure
58 %{__make} all
59 %if %{with opt}
60 %{__make} opt
61 %endif
62
63 %if 0
64 # Build translations.
65 %{__make} -C po
66
67 # Force rebuild of man page.
68 rm -f virt-top/virt-top.1
69 %{__make} -C virt-top virt-top.1
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 %if 0
78 # Install translations.
79 install -d $RPM_BUILD_ROOT%{_localedir}
80 %{__make} -C po install \
81         PODIR=$RPM_BUILD_ROOT%{_localedir}
82 %find_lang %{name}
83 %endif
84
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
88
89 %ifarch ppc ppc64
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
92 # architectures.
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
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
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*
This page took 0.082664 seconds and 3 git commands to generate.