Blame virt-mem.spec

3b773b8
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
3b773b8
%define debug_package %{nil}
3b773b8
3b773b8
Name:           virt-mem
ce6801b
Version:        0.3.1
1563c4b
Release:        8%{?dist}
3b773b8
Summary:        Management tools for virtual machines
3b773b8
3b773b8
Group:          Development/Libraries
3b773b8
License:        GPLv2+
3b773b8
URL:            http://et.redhat.com/~rjones/virt-mem/
3b773b8
Source0:        http://et.redhat.com/~rjones/virt-mem/files/%{name}-%{version}.tar.gz
3b773b8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e092c6f
ExcludeArch:    sparc64 s390 s390x
3b773b8
f82e628
Patch0:         virt-mem-0.3.1-bitstring2.patch
f82e628
Patch1:         virt-mem-0.3.1-dynlink.patch
0d33fe3
Patch2:         virt-mem-0.3.1-fix-permissions.patch
f82e628
3b773b8
BuildRequires:  ocaml >= 3.10.0
3b773b8
BuildRequires:  ocaml-ocamldoc
3b773b8
BuildRequires:  ocaml-findlib-devel
3b773b8
BuildRequires:  ocaml-camlp4-devel
3b773b8
BuildRequires:  ocaml-extlib-devel
3b773b8
BuildRequires:  ocaml-libvirt-devel >= 0.4.4.2
3b773b8
BuildRequires:  ocaml-xml-light-devel
3b773b8
BuildRequires:  ocaml-xmlrpc-light-devel
f82e628
BuildRequires:  ocaml-bitstring-devel >= 2.0.0
3b773b8
BuildRequires:  ocaml-csv-devel
3b773b8
BuildRequires:  ocaml-gettext-devel
3b773b8
BuildRequires:  ocaml-pcre-devel
3b773b8
BuildRequires:  libvirt-devel >= 0.4.4
3b773b8
3b773b8
# Missing indirect requirements of ocaml-xmlrpc-light-devel.
3b773b8
# https://bugzilla.redhat.com/show_bug.cgi?id=458265
3b773b8
BuildRequires:  ocaml-ocamlnet-devel
3b773b8
BuildRequires:  ocaml-ocamlnet-nethttpd-devel
3b773b8
3b773b8
# Missing indirect requirement of ocaml-pcre-devel.
3b773b8
BuildRequires:  pcre-devel
3b773b8
3b773b8
# For perldoc
3b773b8
BuildRequires:  perl
3b773b8
3b773b8
%define _use_internal_dependency_generator 0
3b773b8
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
3b773b8
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
3b773b8
3b773b8
%description
3b773b8
These are a collection of monitoring and management tools for virtual
3b773b8
machines.
3b773b8
3b773b8
Commands we support at the moment include:
3b773b8
3b773b8
  virt-uname      'uname' command, shows OS version, architecture, etc.
3b773b8
  virt-dmesg      'dmesg' command, shows kernel messages
3b773b8
  virt-ps         'ps' command, shows process list
3b773b8
3b773b8
The general idea is that they allow you to monitor virtual machines
3b773b8
without needing to log in to the machine itself or install any extra
3b773b8
software inside the virtual machine.  At the moment we only support
3b773b8
virtual machines running Linux kernel >= 2.6, but we expect to support
3b773b8
other operating systems in the future.
3b773b8
3b773b8
Most of the commands also offer a CSV (comma-separated values) output
3b773b8
format ('virt-xx --csv'), allowing usage from scripts to update
3b773b8
spreadsheets, databases or integrate with existing monitoring systems
3b773b8
like Nagios.
3b773b8
3b773b8
The commands use libvirt to access the underlying virtualization
3b773b8
system, so we support a variety of different systems such as Xen, QEMU
3b773b8
and KVM, and more can be added just by adding support to libvirt.
3b773b8
3b773b8
3b773b8
%prep
3b773b8
%setup -q
f82e628
%patch0 -p1
f82e628
%patch1 -p1
0d33fe3
%patch2 -p1
3b773b8
3b773b8
3b773b8
%build
3b773b8
%configure
bb9170f
bb9170f
# Stack overflow when building the kernel descriptions ...
bb9170f
ulimit -s unlimited
bb9170f
3b773b8
make all
3b773b8
3b773b8
# Build translations.
3b773b8
make -C po
3b773b8
3b773b8
3b773b8
%install
3b773b8
rm -rf $RPM_BUILD_ROOT
3b773b8
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale
3b773b8
make DESTDIR=$RPM_BUILD_ROOT install PODIR="$RPM_BUILD_ROOT%{_datadir}/locale"
3b773b8
3b773b8
# Find translations.
3b773b8
%find_lang %{name}
3b773b8
3b773b8
# Strip executables.
3b773b8
strip $RPM_BUILD_ROOT%{_bindir}/*
3b773b8
3b773b8
3b773b8
%clean
3b773b8
rm -rf $RPM_BUILD_ROOT
3b773b8
3b773b8
3b773b8
%files -f %{name}.lang
3b773b8
%defattr(-,root,root,-)
3b773b8
%doc COPYING README ChangeLog
3b773b8
%{_bindir}/*
3b773b8
%{_mandir}/man1/*
3b773b8
3b773b8
3b773b8
%changelog
1563c4b
* Fri Jun 12 2009 Richard W.M. Jones <rjones@redhat.com> - 0.3.1-8
0d33fe3
- Fix for libvirt 0.6: Libvirt.D.memory_peek now requires write permission
0d33fe3
  to the hypervisor connection.
0d33fe3
e092c6f
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
e092c6f
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
e092c6f
  (added sparc64 per request from the sparc maintainer)
e092c6f
03dcced
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-6
03dcced
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
03dcced
bb9170f
* Fri Dec  5 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.1-5
91d954f
- Rebuild for OCaml 3.11.0.
f82e628
- Fix for bitstring 2.0.0.
f82e628
- Fix for dynlink.cma dep on camlp4.
bb9170f
- Avoid stack overflow on ppc64.
91d954f
33d9705
* Mon Aug 25 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.1-2
33d9705
- Forgot to add the new sources to previous release.
33d9705
ce6801b
* Mon Aug 25 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.1-1
ce6801b
- New upstream release 0.3.1.
ce6801b
fc7864b
* Tue Aug 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.9-6
fc7864b
- Bump release to ensure upgrade path between releases.
fc7864b
3b773b8
* Thu Aug  7 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.9-3
3b773b8
- Added missing indirect BRs for ocaml-xmlrpc-light-devel.
3b773b8
- Added missing BR ocaml-pcre-devel.
3b773b8
3b773b8
* Thu Aug  7 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.9-1
3b773b8
- New upstream release 0.2.9:
3b773b8
- Fixes 64 bit builds.
3b773b8
- Fixes builds on Fedora 8.
3b773b8
3b773b8
* Thu Aug  7 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.8-3
3b773b8
- Add missing BR ocaml-xmlrpc-light-devel.
3b773b8
3b773b8
* Thu Aug  7 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.8-2
3b773b8
- Add missing BR ocaml-camlp4-devel.
3b773b8
3b773b8
* Thu Aug  7 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.8-1
3b773b8
- New upstream version.
3b773b8
3b773b8
* Tue Jun 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.4-1
3b773b8
- Initial RPM release.