diff --git a/mingw-libvirt.spec b/mingw-libvirt.spec new file mode 100644 index 0000000..bcd4438 --- /dev/null +++ b/mingw-libvirt.spec @@ -0,0 +1,280 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} +%define __debug_install_post %{_mingw32_debug_install_post} + +# 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} + +# 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} +# missing libwsman, so can't build hyper-v +%define with_hyperv 0%{!?_without_hyperv:0} +%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 + +Name: mingw-libvirt +Version: 0.9.10 +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) + +# Mingw-w64 trunk (jan 27 2012) contains an inline implementation of the +# vscanf and vfscanf functions in stdio.h. This break compilation of gnulib +# which tries to provide its own implementation for the vscanf and vfscanf +# functions. Workaround is by making sure that the inline implementation +# isn't triggered by #include +Patch0: libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch + +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 +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif + +%if %{with_phyp} +BuildRequires: mingw32-libssh2 +%endif +%if %{with_esx} +BuildRequires: mingw32-curl +%endif + +BuildArch: noarch + +%{?_mingw32_debug_package} + +%description +MinGW Windows libvirt virtualization library. + + +%package -n mingw32-libvirt +Summary: MinGW Windows libvirt virtualization library + +%description -n mingw32-libvirt +MinGW Windows libvirt virtualization library. + + +%prep +%setup -q -n libvirt-%{version} +%patch0 -p0 + + +%build +%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 + +%if 0%{?enable_autotools} +autoreconf -if +%endif +# XXX enable SASL in future +%{_mingw32_configure} \ + --without-xen \ + --without-qemu \ + --without-openvz \ + --without-lxc \ + --without-vbox \ + %{?_without_xenapi} \ + --without-sasl \ + --without-avahi \ + --without-polkit \ + --without-python \ + --without-libvirtd \ + --without-uml \ + %{?_without_phyp} \ + %{?_without_esx} \ + %{?_without_hyperv} \ + --without-vmware \ + --without-netcf \ + --without-audit \ + --without-dtrace +make + + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR=$RPM_BUILD_ROOT install + +rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt/nwfilter +rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/* +rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/* + +rm -rf $RPM_BUILD_ROOT%{_mingw32_libexecdir}/libvirt_iohelper.exe + +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt-qemu.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -n mingw32-libvirt +%defattr(-,root,root) +%dir %{_mingw32_sysconfdir}/libvirt/ +%config(noreplace) %{_mingw32_sysconfdir}/libvirt/libvirt.conf + +%{_mingw32_bindir}/libvirt-0.dll +%{_mingw32_bindir}/virsh.exe +%{_mingw32_bindir}/virt-xml-validate +%{_mingw32_bindir}/virt-pki-validate +%{_mingw32_bindir}/virt-host-validate.exe +%{_mingw32_bindir}/libvirt-qemu-0.dll + +%{_mingw32_libdir}/libvirt.dll.a +%{_mingw32_libdir}/libvirt.la +%{_mingw32_libdir}/pkgconfig/libvirt.pc +%{_mingw32_libdir}/libvirt-qemu.dll.a +%{_mingw32_libdir}/libvirt-qemu.la + +%dir %{_mingw32_datadir}/libvirt/ +%dir %{_mingw32_datadir}/libvirt/schemas/ +%{_mingw32_datadir}/libvirt/schemas/basictypes.rng +%{_mingw32_datadir}/libvirt/schemas/capability.rng +%{_mingw32_datadir}/libvirt/schemas/domain.rng +%{_mingw32_datadir}/libvirt/schemas/domaincommon.rng +%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng +%{_mingw32_datadir}/libvirt/schemas/interface.rng +%{_mingw32_datadir}/libvirt/schemas/network.rng +%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng +%{_mingw32_datadir}/libvirt/schemas/nodedev.rng +%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng +%{_mingw32_datadir}/libvirt/schemas/secret.rng +%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng +%{_mingw32_datadir}/libvirt/schemas/storagepool.rng +%{_mingw32_datadir}/libvirt/schemas/storagevol.rng + +%{_mingw32_datadir}/libvirt/cpu_map.xml + +%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo + +%dir %{_mingw32_includedir}/libvirt +%{_mingw32_includedir}/libvirt/libvirt.h +%{_mingw32_includedir}/libvirt/virterror.h +%{_mingw32_includedir}/libvirt/libvirt-qemu.h + +%{_mingw32_mandir}/man1/virsh.1* +%{_mingw32_mandir}/man1/virt-xml-validate.1* +%{_mingw32_mandir}/man1/virt-pki-validate.1* +%{_mingw32_mandir}/man1/virt-host-validate.1* + + +%changelog +* Wed Mar 07 2012 Kalev Lember - 0.9.10-3 +- Renamed the source package to mingw-libvirt (#800924) + +* Tue Feb 28 2012 Erik van Pienbroek - 0.9.10-2 +- Rebuild against the mingw-w64 toolchain +- Workaround compile failure against mingw-w64 trunk + +* Mon Feb 20 2012 Daniel P. Berrange - 0.9.10-1 +- Update to 0.9.10 release + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Dec 19 2011 Daniel P. Berrange - 0.9.8-1 +- Update to 0.9.8 release + +* Thu Nov 10 2011 Daniel P. Berrange - 0.9.7-2 +- Add libvirt confdir to files section + +* Wed Nov 9 2011 Daniel P. Berrange - 0.9.7-1 +- Update to 0.9.7 release + +* Thu Sep 22 2011 Daniel P. Berrange - 0.9.6-1 +- Update to 0.9.6 release + +* Wed Aug 3 2011 Daniel P. Berrange - 0.9.4-1 +- Update to 0.9.4 release + +* Thu Jul 07 2011 Kalev Lember - 0.9.3-2 +- Rebuilt against win-iconv + +* Tue Jul 5 2011 Daniel P. Berrange - 0.9.3-1 +- Update to 0.9.3 release + +* Wed Apr 27 2011 Erik van Pienbroek - 0.8.5-5 +- Dropped the proxy-libintl pieces + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Daniel P. Berrange - 0.8.5-2 +- Fix linkage against intl.dll + +* Fri Dec 17 2010 Daniel P. Berrange - 0.8.5-1 +- Update to 0.8.5 release + +* Wed Sep 8 2010 Daniel P. Berrange - 0.8.3-1 +- Add autotools build requires to enable makefile rebuild + +* Mon Sep 6 2010 Daniel P. Berrange - 0.8.3-1 +- Initial Fedora import from review (rhbz #467418) +- Update to use 0.8.3 sources + +* Thu Sep 25 2008 Richard Jones - 0.4.6-3 +- BuildArch should be noarch + +* Wed Sep 24 2008 Richard W.M. Jones - 0.4.6-2 +- Whitespace removal. + +* Wed Sep 24 2008 Richard W.M. Jones - 0.4.6-1 +- New upstream release 0.4.6. +- Rename mingw -> mingw32. + +* Mon Sep 22 2008 Daniel P. Berrange - 0.4.5-4%{?extra_release} +- Import crash fix from rawhide + +* Thu Sep 11 2008 Daniel P. Berrange - 0.4.5-3%{?extra_release} +- Add dep on gettext & pkgconfig + +* Wed Sep 10 2008 Richard W.M. Jones - 0.4.5-2 +- Remove static lib. + +* Tue Sep 2 2008 Daniel P. Berrange - 0.4.4-1 +- Initial RPM release, largely based on earlier work from several sources. diff --git a/mingw32-libvirt.spec b/mingw32-libvirt.spec deleted file mode 100644 index 89d5182..0000000 --- a/mingw32-libvirt.spec +++ /dev/null @@ -1,270 +0,0 @@ -%define __strip %{_mingw32_strip} -%define __objdump %{_mingw32_objdump} -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw32_findrequires} -%define __find_provides %{_mingw32_findprovides} -%define __debug_install_post %{_mingw32_debug_install_post} - -# 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} - -# 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} -# missing libwsman, so can't build hyper-v -%define with_hyperv 0%{!?_without_hyperv:0} -%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 - -Name: mingw32-libvirt -Version: 0.9.10 -Release: 2%{?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) - -# Mingw-w64 trunk (jan 27 2012) contains an inline implementation of the -# vscanf and vfscanf functions in stdio.h. This break compilation of gnulib -# which tries to provide its own implementation for the vscanf and vfscanf -# functions. Workaround is by making sure that the inline implementation -# isn't triggered by #include -Patch0: libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch - -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 -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -%endif - -%if %{with_phyp} -BuildRequires: mingw32-libssh2 -%endif -%if %{with_esx} -BuildRequires: mingw32-curl -%endif - -BuildArch: noarch - -%{?_mingw32_debug_package} - -%description -MinGW Windows libvirt virtualization library. - - -%prep -%setup -q -n libvirt-%{version} -%patch0 -p0 - - -%build -%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 - -%if 0%{?enable_autotools} -autoreconf -if -%endif -# XXX enable SASL in future -%{_mingw32_configure} \ - --without-xen \ - --without-qemu \ - --without-openvz \ - --without-lxc \ - --without-vbox \ - %{?_without_xenapi} \ - --without-sasl \ - --without-avahi \ - --without-polkit \ - --without-python \ - --without-libvirtd \ - --without-uml \ - %{?_without_phyp} \ - %{?_without_esx} \ - %{?_without_hyperv} \ - --without-vmware \ - --without-netcf \ - --without-audit \ - --without-dtrace -make - - -%install -rm -rf $RPM_BUILD_ROOT - -make DESTDIR=$RPM_BUILD_ROOT install - -rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt/nwfilter -rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/* -rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/* - -rm -rf $RPM_BUILD_ROOT%{_mingw32_libexecdir}/libvirt_iohelper.exe - -rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a -rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt-qemu.a - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root) -%dir %{_mingw32_sysconfdir}/libvirt/ -%config(noreplace) %{_mingw32_sysconfdir}/libvirt/libvirt.conf - -%{_mingw32_bindir}/libvirt-0.dll -%{_mingw32_bindir}/virsh.exe -%{_mingw32_bindir}/virt-xml-validate -%{_mingw32_bindir}/virt-pki-validate -%{_mingw32_bindir}/virt-host-validate.exe -%{_mingw32_bindir}/libvirt-qemu-0.dll - -%{_mingw32_libdir}/libvirt.dll.a -%{_mingw32_libdir}/libvirt.la -%{_mingw32_libdir}/pkgconfig/libvirt.pc -%{_mingw32_libdir}/libvirt-qemu.dll.a -%{_mingw32_libdir}/libvirt-qemu.la - -%dir %{_mingw32_datadir}/libvirt/ -%dir %{_mingw32_datadir}/libvirt/schemas/ -%{_mingw32_datadir}/libvirt/schemas/basictypes.rng -%{_mingw32_datadir}/libvirt/schemas/capability.rng -%{_mingw32_datadir}/libvirt/schemas/domain.rng -%{_mingw32_datadir}/libvirt/schemas/domaincommon.rng -%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng -%{_mingw32_datadir}/libvirt/schemas/interface.rng -%{_mingw32_datadir}/libvirt/schemas/network.rng -%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng -%{_mingw32_datadir}/libvirt/schemas/nodedev.rng -%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng -%{_mingw32_datadir}/libvirt/schemas/secret.rng -%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng -%{_mingw32_datadir}/libvirt/schemas/storagepool.rng -%{_mingw32_datadir}/libvirt/schemas/storagevol.rng - -%{_mingw32_datadir}/libvirt/cpu_map.xml - -%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo - -%dir %{_mingw32_includedir}/libvirt -%{_mingw32_includedir}/libvirt/libvirt.h -%{_mingw32_includedir}/libvirt/virterror.h -%{_mingw32_includedir}/libvirt/libvirt-qemu.h - -%{_mingw32_mandir}/man1/virsh.1* -%{_mingw32_mandir}/man1/virt-xml-validate.1* -%{_mingw32_mandir}/man1/virt-pki-validate.1* -%{_mingw32_mandir}/man1/virt-host-validate.1* - - -%changelog -* Tue Feb 28 2012 Erik van Pienbroek - 0.9.10-2 -- Rebuild against the mingw-w64 toolchain -- Workaround compile failure against mingw-w64 trunk - -* Mon Feb 20 2012 Daniel P. Berrange - 0.9.10-1 -- Update to 0.9.10 release - -* Fri Jan 13 2012 Fedora Release Engineering - 0.9.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Dec 19 2011 Daniel P. Berrange - 0.9.8-1 -- Update to 0.9.8 release - -* Thu Nov 10 2011 Daniel P. Berrange - 0.9.7-2 -- Add libvirt confdir to files section - -* Wed Nov 9 2011 Daniel P. Berrange - 0.9.7-1 -- Update to 0.9.7 release - -* Thu Sep 22 2011 Daniel P. Berrange - 0.9.6-1 -- Update to 0.9.6 release - -* Wed Aug 3 2011 Daniel P. Berrange - 0.9.4-1 -- Update to 0.9.4 release - -* Thu Jul 07 2011 Kalev Lember - 0.9.3-2 -- Rebuilt against win-iconv - -* Tue Jul 5 2011 Daniel P. Berrange - 0.9.3-1 -- Update to 0.9.3 release - -* Wed Apr 27 2011 Erik van Pienbroek - 0.8.5-5 -- Dropped the proxy-libintl pieces - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Dec 20 2010 Daniel P. Berrange - 0.8.5-2 -- Fix linkage against intl.dll - -* Fri Dec 17 2010 Daniel P. Berrange - 0.8.5-1 -- Update to 0.8.5 release - -* Wed Sep 8 2010 Daniel P. Berrange - 0.8.3-1 -- Add autotools build requires to enable makefile rebuild - -* Mon Sep 6 2010 Daniel P. Berrange - 0.8.3-1 -- Initial Fedora import from review (rhbz #467418) -- Update to use 0.8.3 sources - -* Thu Sep 25 2008 Richard Jones - 0.4.6-3 -- BuildArch should be noarch - -* Wed Sep 24 2008 Richard W.M. Jones - 0.4.6-2 -- Whitespace removal. - -* Wed Sep 24 2008 Richard W.M. Jones - 0.4.6-1 -- New upstream release 0.4.6. -- Rename mingw -> mingw32. - -* Mon Sep 22 2008 Daniel P. Berrange - 0.4.5-4%{?extra_release} -- Import crash fix from rawhide - -* Thu Sep 11 2008 Daniel P. Berrange - 0.4.5-3%{?extra_release} -- Add dep on gettext & pkgconfig - -* Wed Sep 10 2008 Richard W.M. Jones - 0.4.5-2 -- Remove static lib. - -* Tue Sep 2 2008 Daniel P. Berrange - 0.4.4-1 -- Initial RPM release, largely based on earlier work from several sources.