diff --git a/.cvsignore b/.cvsignore index 5e055a6ad9ebd7785fc15f41d49102566d93f515..eded526e5b2fb94c3a35c8099ac35b151e7f6eab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -20,7 +20,7 @@ ltconfig update.log libvirt.pc libvirt.spec -mingw-libvirt.spec +mingw32-libvirt.spec COPYING m4 ABOUT-NLS diff --git a/ChangeLog b/ChangeLog index a207e61bf9575d1f8567af02e864e8e37194bfe7..68515d6cd6d952187f00e0f49cec64897c2f8fac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Oct 10 12:30:00 BST 2008 Richard W.M. Jones + + Updated MinGW spec file. + * .cvsignore, Makefile.am, autobuild.sh, configure.in, + mingw32-libvirt.spec.in: Import the latest MinGW libvirt spec + file. Note that the file has been renamed to conform to + new Fedora packaging guidelines. + * autobuild.sh: Fix a bug in the generation of the $EXTRA_RELEASE + field when autobuilding. + Fri Oct 10 11:17:59 CEST 2008 Daniel Veillard * include/libvirt/libvirt.h[.in] include/libvirt/virterror.h diff --git a/Makefile.am b/Makefile.am index 2df4ba562501c2b406d7ebafe901177df5fb1ec3..073063d2b8189288a035c314f80c1bd9d77b4e55 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4 EXTRA_DIST = \ libvirt.spec libvirt.spec.in \ - mingw-libvirt.spec.in \ + mingw32-libvirt.spec.in \ libvirt.pc libvirt.pc.in \ $(man_MANS) autobuild.sh \ .x-sc_avoid_if_before_free \ diff --git a/autobuild.sh b/autobuild.sh index 50b4e0ce79ea03ff572f10ee28ac9f6c1da3d463..e62926c4333f69a57664ff91b25ffd67cd32ccd5 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -42,14 +42,14 @@ test -x /usr/bin/lcov && make cov rm -f *.tar.gz make dist -if [ -f /usr/bin/rpmbuild ]; then - if [ -n "$AUTOBUILD_COUNTER" ]; then - EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" - else - NOW=`date +"%s"` - EXTRA_RELEASE=".$USER$NOW" - fi +if [ -n "$AUTOBUILD_COUNTER" ]; then + EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" +else + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" +fi +if [ -f /usr/bin/rpmbuild ]; then rpmbuild --nodeps \ --define "extra_release $EXTRA_RELEASE" \ --define "_sourcedir `pwd`" \ @@ -81,8 +81,10 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then #set -o pipefail #make check 2>&1 | tee "$RESULTS" - rpmbuild --nodeps \ - --define "extra_release $EXTRA_RELEASE" \ - --define "_sourcedir `pwd`" \ - -ba --clean mingw-libvirt.spec + if [ -f /usr/bin/rpmbuild ]; then + rpmbuild --nodeps \ + --define "extra_release $EXTRA_RELEASE" \ + --define "_sourcedir `pwd`" \ + -ba --clean mingw32-libvirt.spec + fi fi diff --git a/configure.in b/configure.in index 338aabf518327792f6141cd95f3ea94c112b4669..0843f9534c59be4f51ccb600cbd6d4397e0e3411 100644 --- a/configure.in +++ b/configure.in @@ -1045,7 +1045,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \ docs/examples/python/Makefile \ gnulib/lib/Makefile \ gnulib/tests/Makefile \ - libvirt.pc libvirt.spec mingw-libvirt.spec \ + libvirt.pc libvirt.spec mingw32-libvirt.spec \ po/Makefile.in \ include/libvirt/Makefile include/libvirt/libvirt.h \ python/Makefile python/tests/Makefile \ diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in deleted file mode 100644 index d6f91b961de6578cf38c6b89cdd0753a6ac2ba80..0000000000000000000000000000000000000000 --- a/mingw-libvirt.spec.in +++ /dev/null @@ -1,87 +0,0 @@ -%include /usr/lib/rpm/mingw-defs - -Name: mingw-libvirt -Version: @VERSION@ -Release: 1%{?dist}%{?extra_release} -Summary: MinGW Windows libvirt virtualization library - -License: LGPLv2+ -Group: Development/Libraries -URL: http://www.libvirt.org/ -Source0: ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: mingw-filesystem >= 19 -BuildRequires: mingw-gcc -BuildRequires: mingw-binutils -BuildRequires: mingw-libgpg-error -BuildRequires: mingw-libgcrypt -BuildRequires: mingw-gnutls -BuildRequires: mingw-gettext -BuildRequires: mingw-libxml2 -BuildRequires: mingw-portablexdr - -%description -MinGW Windows libvirt virtualization library. - - -%prep -%setup -q -n libvirt-%{version} - - -%build -# XXX enable SASL in future -PKG_CONFIG_PATH="%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \ -CC="i686-pc-mingw32-gcc" \ -CFLAGS="-O2 -g -Wall -pipe" \ -./configure \ - --build=%_build \ - --host=i686-pc-mingw32 \ - --prefix=%{_prefix}/i686-pc-mingw32/sys-root/mingw \ - --without-sasl \ - --without-avahi \ - --without-polkit \ - --without-python \ - --without-xen \ - --without-qemu \ - --without-lxc \ - --without-openvz \ - --without-libvirtd -make - - -%install -rm -rf $RPM_BUILD_ROOT - -make DESTDIR=$RPM_BUILD_ROOT install - -rm -rf $RPM_BUILD_ROOT/%{_mingw_sysconfdir}/libvirt -rm -rf $RPM_BUILD_ROOT/%{_mingw_datadir}/doc/* -rm -rf $RPM_BUILD_ROOT/%{_mingw_datadir}/gtk-doc/* - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root) -%{_mingw_bindir}/libvirt-0.dll -%{_mingw_bindir}/virsh.exe - -%{_mingw_libdir}/libvirt.a -%{_mingw_libdir}/libvirt.dll.a -%{_mingw_libdir}/libvirt.la -%{_mingw_libdir}/pkgconfig/libvirt.pc - -%{_mingw_datadir}/locale/*/LC_MESSAGES/libvirt.mo - -%dir %{_mingw_includedir}/libvirt -%{_mingw_includedir}/libvirt/libvirt.h -%{_mingw_includedir}/libvirt/virterror.h - -%{_mingw_mandir}/man1/virsh.1* - - -%changelog -* 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.in b/mingw32-libvirt.spec.in new file mode 100644 index 0000000000000000000000000000000000000000..f0c0c0d52c6026bd65fbc51297203a3683cf83af --- /dev/null +++ b/mingw32-libvirt.spec.in @@ -0,0 +1,112 @@ +%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-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 + +BuildArch: noarch + + +%description +MinGW Windows libvirt virtualization library. + + +%prep +%setup -q -n libvirt-%{version} + + +%build +# XXX enable SASL in future +%{_mingw32_configure} \ + --without-sasl \ + --without-avahi \ + --without-polkit \ + --without-python \ + --without-xen \ + --without-qemu \ + --without-lxc \ + --without-openvz \ + --without-libvirtd +make + + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR=$RPM_BUILD_ROOT install + +rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt +rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/* +rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/* + +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/libvirt-0.dll +%{_mingw32_bindir}/virsh.exe + +%{_mingw32_libdir}/libvirt.dll.a +%{_mingw32_libdir}/libvirt.la +%{_mingw32_libdir}/pkgconfig/libvirt.pc + +%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo + +%dir %{_mingw32_includedir}/libvirt +%{_mingw32_includedir}/libvirt/libvirt.h +%{_mingw32_includedir}/libvirt/virterror.h + +%{_mingw32_mandir}/man1/virsh.1* + + +%changelog +* 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.