File vhostmd.spec of Package vhostmd.554
#
# spec file for package vhostmd
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define with_xen 0%{!?_without_xen:1}
# Xen is available only on x86_64
%ifnarch x86_64
%define with_xen 0
%endif
Name: vhostmd
BuildRequires: libtool
BuildRequires: libvirt-devel
BuildRequires: libxml2
BuildRequires: libxml2-devel
BuildRequires: pkg-config
%if %{with_xen}
BuildRequires: xen-devel
%endif
Summary: Virtual Host Metrics Daemon (vhostmd)
License: LGPL-2.1+
Group: System/Daemons
Version: 0.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: coreutils, %insserv_prereq
Source0: vhostmd-%{version}.tar.bz2
Patch0: vhostmd-conf.patch
Patch1: manpage.patch
Patch2: value-newline.patch
Patch3: libmetrics-link.patch
%description
vhostmd provides a "metrics communication channel" between a host and
its hosted virtual machines, allowing limited introspection of host
resource usage from within virtual machines
Authors:
--------
Jim Fehlig <jfehlig@novell.com>
Pat Campbell
%package -n vm-dump-metrics
Summary: Virtual Host Metrics Daemon (vhostmd)
Group: System/Monitoring
%description -n vm-dump-metrics
vhostmd provides a "metrics communication channel" between a host and
its hosted virtual machines, allowing limited introspection of host
resource usage from within virtual machines
Authors:
--------
Jim Fehlig <jfehlig@novell.com>
Pat Campbell
%package -n vm-dump-metrics-devel
Summary: Virtual Host Metrics Daemon (vhostmd)
Group: Development/Libraries/C and C++
Requires: vm-dump-metrics = %{version}
%description -n vm-dump-metrics-devel
vhostmd provides a "metrics communication channel" between a host and
its hosted virtual machines, allowing limited introspection of host
resource usage from within virtual machines
Authors:
--------
Jim Fehlig <jfehlig@novell.com>
Pat Campbell
%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%if ! %{with_xen}
%define _disable_libxenstat --disable-libxenstat
%define _disable_xenctrl --disable-xenctrl
%endif
autoreconf -fi
%configure --without-xenstore \
%{?_disable_libxenstat} \
%{?_disable_xenctrl}
make
%preun
# Start of pre-remove script
%{stop_on_removal vhostmd}
# exit 0
# End of pre-remove script
%postun
# Start post-remove script
%restart_on_update vhostmd
%{insserv_cleanup}
%install
# init scripts
make DESTDIR=$RPM_BUILD_ROOT install
ln -s /etc/init.d/vhostmd $RPM_BUILD_ROOT/usr/sbin/rcvhostmd
%post -n vm-dump-metrics-devel
# Start post-insall script
sbin/ldconfig
%postun -n vm-dump-metrics-devel
# Start post-remove script
sbin/ldconfig
%files
%defattr(-,root,root)
%dir /etc/vhostmd
%dir /usr/share/vhostmd
%dir /usr/share/vhostmd/scripts
%dir /usr/share/doc/vhostmd
/usr/sbin/vhostmd
/usr/sbin/rcvhostmd
/usr/share/vhostmd/scripts/pagerate.pl
%config(noreplace) /etc/vhostmd/vhostmd.conf
%config /etc/vhostmd/vhostmd.dtd
%config /etc/vhostmd/metric.dtd
/etc/init.d/vhostmd
/usr/share/doc/vhostmd/vhostmd.dtd
/usr/share/doc/vhostmd/metric.dtd
/usr/share/doc/vhostmd/vhostmd.xml
/usr/share/doc/vhostmd/mdisk.xml
/usr/share/doc/vhostmd/README
/usr/share/man/man8/vhostmd.8.gz
%files -n vm-dump-metrics
%defattr(-,root,root)
/usr/sbin/vm-dump-metrics
/usr/share/man/man1/vm-dump-metrics.1.gz
%files -n vm-dump-metrics-devel
%defattr(-,root,root)
%{_libdir}/libmetrics.a
%{_libdir}/libmetrics.la
%{_libdir}/libmetrics.so
%{_libdir}/libmetrics.so.0
%{_libdir}/libmetrics.so.0.0.0
%dir /usr/include/vhostmd
/usr/include/vhostmd/libmetrics.h
%changelog