2008-10-10 15:33:10 +04:00
%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
2010-05-04 21:12:01 +04:00
%define __debug_install_post %{_mingw32_debug_install_post}
2008-10-10 15:33:10 +04:00
2011-12-05 21:22:10 +04:00
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%define enable_autotools 0}
2011-09-27 18:52:47 +04:00
# The mingw build is client only. Set up defaults for hypervisor drivers
# that talk via a native remote protocol, and for which prereq mingw
# libraries exist.
%define with_phyp 0%{!?_without_phyp:1}
%define with_esx 0%{!?_without_esx:1}
2011-10-14 13:01:56 +04:00
# missing libwsman, so can't build hyper-v
%define with_hyperv 0%{!?_without_hyperv:0}
2011-09-27 18:52:47 +04:00
%define with_xenapi 0%{!?_without_xenapi:1}
# RHEL ships ESX but not PowerHypervisor, HyperV, or libxenserver (xenapi)
%if 0%{?rhel}
%define with_phyp 0
%define with_xenapi 0
%define with_hyperv 0
%endif
2008-10-10 15:33:10 +04:00
Name : mingw32-libvirt
Version : @VERSION@
Release : 3%{?dist} %{?extra_release}
Summary : MinGW Windows libvirt virtualization library
License : LGPLv2+
Group : Development/Libraries
URL : http://libvirt.org/
Source0 : ftp://libvirt.org/libvirt/libvirt-%{version} .tar.gz
BuildRoot : %{_tmppath} /%{name} -%{version} -%{release} -root-%(%{__id_u} -n)
BuildRequires : mingw32-filesystem >= 23
BuildRequires : mingw32-gcc
BuildRequires : mingw32-binutils
BuildRequires : mingw32-libgpg-error
BuildRequires : mingw32-libgcrypt
BuildRequires : mingw32-gnutls
BuildRequires : mingw32-gettext
BuildRequires : mingw32-libxml2
BuildRequires : mingw32-portablexdr
BuildRequires : pkgconfig
# Need native version for msgfmt
BuildRequires : gettext
2011-12-05 21:22:10 +04:00
%if 0%{?enable_autotools}
BuildRequires : autoconf
BuildRequires : automake
BuildRequires : gettext-devel
BuildRequires : libtool
%endif
2008-10-10 15:33:10 +04:00
2011-09-27 18:52:47 +04:00
%if %{with_phyp}
BuildRequires : mingw32-libssh2
%endif
%if %{with_esx}
BuildRequires : mingw32-curl
%endif
2008-10-10 15:33:10 +04:00
BuildArch : noarch
2010-05-04 21:12:01 +04:00
%{?_mingw32_debug_package}
2008-10-10 15:33:10 +04:00
%description
MinGW Windows libvirt virtualization library.
%prep
%setup -q -n libvirt-%{version}
%build
2011-09-27 18:52:47 +04:00
%if ! %{with_phyp}
%define _without_phyp --without-phyp
%endif
%if ! %{with_esx}
%define _without_esx --without-esx
%endif
%if ! %{with_hyperv}
%define _without_hyperv --without-hyperv
%endif
%if ! %{with_xenapi}
%define _without_xenapi --without-xenapi
%endif
2011-12-05 21:22:10 +04:00
%if 0%{?enable_autotools}
autoreconf -if
%endif
2008-10-10 15:33:10 +04:00
# XXX enable SASL in future
%{_mingw32_configure} \
2011-09-27 18:52:47 +04:00
--without-xen \
--without-qemu \
--without-openvz \
--without-lxc \
--without-vbox \
%{?_without_xenapi} \
2008-10-10 15:33:10 +04:00
--without-sasl \
--without-avahi \
--without-polkit \
--without-python \
2011-09-27 18:52:47 +04:00
--without-libvirtd \
2008-11-25 14:27:51 +03:00
--without-uml \
2011-09-27 18:52:47 +04:00
%{?_without_phyp} \
%{?_without_esx} \
%{?_without_hyperv} \
--without-vmware \
2009-07-30 16:07:51 +04:00
--without-netcf \
2010-09-15 17:44:11 +04:00
--without-audit \
2011-09-27 18:52:47 +04:00
--without-dtrace
2008-10-10 15:33:10 +04:00
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
2011-10-13 14:49:45 +04:00
rm -rf $RPM_BUILD_ROOT %{_mingw32_sysconfdir}/libvirt/nwfilter
2008-10-10 15:33:10 +04:00
rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/doc/*
rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/gtk-doc/*
2011-03-31 20:41:51 +04:00
rm -rf $RPM_BUILD_ROOT %{_mingw32_libexecdir}/libvirt_iohelper.exe
2008-10-10 15:33:10 +04:00
rm $RPM_BUILD_ROOT %{_mingw32_libdir}/libvirt.a
2010-09-03 23:48:25 +04:00
rm $RPM_BUILD_ROOT %{_mingw32_libdir}/libvirt-qemu.a
2008-10-10 15:33:10 +04:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-,root,root)
2011-11-10 15:30:57 +04:00
%dir %{_mingw32_sysconfdir}/libvirt/
2011-10-13 14:49:45 +04:00
%config (noreplace) %{_mingw32_sysconfdir}/libvirt/libvirt.conf
2008-10-10 15:33:10 +04:00
%{_mingw32_bindir}/libvirt-0.dll
%{_mingw32_bindir}/virsh.exe
2009-04-19 20:47:43 +04:00
%{_mingw32_bindir}/virt-xml-validate
2009-09-16 17:42:57 +04:00
%{_mingw32_bindir}/virt-pki-validate
2012-01-10 21:31:21 +04:00
%{_mingw32_bindir}/virt-host-validate.exe
2010-09-03 23:48:25 +04:00
%{_mingw32_bindir}/libvirt-qemu-0.dll
2008-10-10 15:33:10 +04:00
%{_mingw32_libdir}/libvirt.dll.a
%{_mingw32_libdir}/libvirt.la
%{_mingw32_libdir}/pkgconfig/libvirt.pc
2010-09-03 23:48:25 +04:00
%{_mingw32_libdir}/libvirt-qemu.dll.a
%{_mingw32_libdir}/libvirt-qemu.la
2008-10-10 15:33:10 +04:00
2009-01-27 18:29:53 +03:00
%dir %{_mingw32_datadir}/libvirt/
%dir %{_mingw32_datadir}/libvirt/schemas/
2011-08-13 05:33:15 +04:00
%{_mingw32_datadir}/libvirt/schemas/basictypes.rng
%{_mingw32_datadir}/libvirt/schemas/capability.rng
2009-01-27 18:29:53 +03:00
%{_mingw32_datadir}/libvirt/schemas/domain.rng
2011-08-13 05:33:15 +04:00
%{_mingw32_datadir}/libvirt/schemas/domaincommon.rng
2010-06-03 00:21:45 +04:00
%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
2011-08-13 05:33:15 +04:00
%{_mingw32_datadir}/libvirt/schemas/interface.rng
2009-01-27 18:29:53 +03:00
%{_mingw32_datadir}/libvirt/schemas/network.rng
2011-08-13 05:33:15 +04:00
%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng
2009-01-27 18:29:53 +03:00
%{_mingw32_datadir}/libvirt/schemas/nodedev.rng
2010-05-04 21:12:01 +04:00
%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng
2009-07-28 04:39:48 +04:00
%{_mingw32_datadir}/libvirt/schemas/secret.rng
2009-08-19 23:50:10 +04:00
%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng
2011-08-13 05:33:15 +04:00
%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
2009-01-27 18:29:53 +03:00
2010-05-04 21:12:01 +04:00
%{_mingw32_datadir}/libvirt/cpu_map.xml
2008-10-10 15:33:10 +04:00
%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
%dir %{_mingw32_includedir}/libvirt
%{_mingw32_includedir}/libvirt/libvirt.h
%{_mingw32_includedir}/libvirt/virterror.h
2010-09-03 23:48:25 +04:00
%{_mingw32_includedir}/libvirt/libvirt-qemu.h
2008-10-10 15:33:10 +04:00
%{_mingw32_mandir}/man1/virsh.1*
2009-04-19 20:47:43 +04:00
%{_mingw32_mandir}/man1/virt-xml-validate.1*
2009-09-16 17:42:57 +04:00
%{_mingw32_mandir}/man1/virt-pki-validate.1*
2012-01-30 16:03:30 +04:00
%{_mingw32_mandir}/man1/virt-host-validate.1*
2008-10-10 15:33:10 +04:00
%changelog
* Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 0.4.6-3
- BuildArch should be noarch
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-2
- Whitespace removal.
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-1
- New upstream release 0.4.6.
- Rename mingw -> mingw32.
* Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-4%{?extra_release}
- Import crash fix from rawhide
* Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-3%{?extra_release}
- Add dep on gettext & pkgconfig
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.5-2
- Remove static lib.
* Tue Sep 2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-1
- Initial RPM release, largely based on earlier work from several sources.