Added virt-top (not for Fedora).
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Nov 2008 17:27:13 +0000 (17:27 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Nov 2008 17:27:13 +0000 (17:27 +0000)
virt-top/NOT-FOR-FEDORA [new file with mode: 0644]
virt-top/mingw32-virt-top.spec [new file with mode: 0644]
virt-top/virt-top-1.0.3-bogus-zh_CN-plurals.patch [new file with mode: 0644]
virt-top/virt-top-1.0.3-link-pdcurses.patch [new file with mode: 0644]

diff --git a/virt-top/NOT-FOR-FEDORA b/virt-top/NOT-FOR-FEDORA
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/virt-top/mingw32-virt-top.spec b/virt-top/mingw32-virt-top.spec
new file mode 100644 (file)
index 0000000..004782d
--- /dev/null
@@ -0,0 +1,103 @@
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+
+Name:           mingw32-virt-top
+Version:        1.0.3
+Release:        1%{?dist}
+Summary:        MinGW Windows port of top(1) for virtualization stats
+
+License:        GPLv2+
+Group:          Development/Libraries
+
+URL:            http://et.redhat.com/~rjones/virt-top/
+Source0:        http://et.redhat.com/~rjones/virt-top/files/virt-top-%{version}.tar.gz
+
+# Patches from native Fedora package:
+Patch0:         virt-top-1.0.3-bogus-zh_CN-plurals.patch
+
+# Patches for MinGW.
+Patch1000:      virt-top-1.0.3-link-pdcurses.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 35
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+
+BuildRequires:  mingw32-ocaml
+BuildRequires:  mingw32-flexdll >= 0.11-7
+#BuildRequires:  ocaml-ocamldoc
+BuildRequires:  mingw32-ocaml-findlib
+BuildRequires:  mingw32-ocaml-curses >= 0.1-3
+BuildRequires:  mingw32-ocaml-extlib
+BuildRequires:  mingw32-ocaml-xml-light
+BuildRequires:  mingw32-ocaml-csv
+BuildRequires:  mingw32-ocaml-calendar
+BuildRequires:  mingw32-ocaml-libvirt
+
+# gettext support is disabled temporarily.
+## Tortuous list of BRs for gettext.
+#BuildRequires:  ocaml-gettext-devel >= 0.3.0
+#BuildRequires:  ocaml-fileutils-devel
+#%ifnarch ppc64
+#BuildRequires:  ocaml-camomile-data
+#%endif
+
+# Non-OCaml BRs.
+BuildRequires:  libvirt-devel
+BuildRequires:  perl
+BuildRequires:  gawk
+
+BuildRequires:  autoconf, automake, libtool
+
+
+%description
+virt-top is a 'top(1)'-like utility for showing stats of virtualized
+domains.  Many keys and command line options are the same as for
+ordinary 'top'.
+
+It uses libvirt so it is capable of showing stats across a variety of
+different virtualization systems.
+
+
+%prep
+%setup -q -n virt-top-%{version}
+
+%patch0 -p1
+%patch1000 -p1
+
+chmod -x COPYING
+
+autoreconf
+
+
+%build
+export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
+%{_mingw32_configure}
+make opt
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw32_bindir}/virt-top
+
+
+%changelog
+* Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
+- Initial RPM release.
diff --git a/virt-top/virt-top-1.0.3-bogus-zh_CN-plurals.patch b/virt-top/virt-top-1.0.3-bogus-zh_CN-plurals.patch
new file mode 100644 (file)
index 0000000..f81ee2c
--- /dev/null
@@ -0,0 +1,10 @@
+--- virt-top-1.0.3/po/zh_CN.po.orig    2008-10-21 10:51:15.000000000 +0100
++++ virt-top-1.0.3/po/zh_CN.po 2008-10-21 10:51:25.000000000 +0100
+@@ -14,7 +14,6 @@
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+-"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+ "X-Generator: KBabel 1.11.4\n"
+ #: ../virt-top/virt_top.ml:1490
diff --git a/virt-top/virt-top-1.0.3-link-pdcurses.patch b/virt-top/virt-top-1.0.3-link-pdcurses.patch
new file mode 100644 (file)
index 0000000..559d3df
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur virt-top-1.0.3.orig/virt-top/Makefile.in virt-top-1.0.3.mingw/virt-top/Makefile.in
+--- virt-top-1.0.3.orig/virt-top/Makefile.in   2008-10-21 09:47:53.000000000 +0100
++++ virt-top-1.0.3.mingw/virt-top/Makefile.in  2008-11-17 17:19:28.000000000 +0000
+@@ -83,7 +83,7 @@
+ virt-top.opt: $(XOBJS)
+       ocamlfind ocamlopt \
+         $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
+-        -cclib -lncurses -o $@ $^
++        -o $@ $^ -cclib "-L/usr/i686-pc-mingw32/sys-root/mingw/lib pdcurses.dll.a"
+ # Manual page.
+ ifeq ($(HAVE_PERLDOC),perldoc)