Added Windows icon patch.
[fedora-mingw.git] / libvirt / mingw32-libvirt.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-libvirt
8 Version:        0.4.6
9 Release:        7%{?dist}%{?extra_release}
10 Summary:        MinGW Windows libvirt virtualization library
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14 URL:            http://libvirt.org/
15 Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 # All of these patches are upstream after 0.4.6.
19 Patch0:         mingw32-libvirt-0.4.6-debug-registration.patch
20 Patch1:         mingw32-libvirt-0.4.6-register-remote.patch
21 Patch2:         mingw32-libvirt-0.4.6-win-icon.patch
22 Source1:        libvirt_win_icon_16x16.ico
23 Source2:        libvirt_win_icon_32x32.ico
24 Source3:        libvirt_win_icon_48x48.ico
25 Source4:        libvirt_win_icon_64x64.ico
26
27 BuildRequires:  mingw32-filesystem >= 23
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30 BuildRequires:  mingw32-libgpg-error
31 BuildRequires:  mingw32-libgcrypt
32 BuildRequires:  mingw32-gnutls
33 BuildRequires:  mingw32-gettext
34 BuildRequires:  mingw32-libxml2
35 # Portable XDR <= 4.0.10 contains a serious endianness bug on Windows.
36 BuildRequires:  mingw32-portablexdr >= 4.0.11
37 BuildRequires:  mingw32-readline
38 BuildRequires:  pkgconfig
39 # Need native version for msgfmt
40 BuildRequires:  gettext
41
42 BuildArch:      noarch
43
44
45 %description
46 MinGW Windows libvirt virtualization library.
47
48
49 %prep
50 %setup -q -n libvirt-%{version}
51 %patch0 -p1
52 %patch1 -p1
53 %patch2 -p0
54 cp %{SOURCE1} src/
55 cp %{SOURCE2} src/
56 cp %{SOURCE3} src/
57 cp %{SOURCE4} src/
58
59
60 %build
61 # XXX enable SASL in future
62 %{_mingw32_configure} \
63   --without-sasl \
64   --without-avahi \
65   --without-polkit \
66   --without-python \
67   --without-xen \
68   --without-qemu \
69   --without-lxc \
70   --without-openvz \
71   --without-libvirtd
72 make
73
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 make DESTDIR=$RPM_BUILD_ROOT install
79
80 rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt
81 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/*
82 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/*
83
84 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a
85
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90
91 %files
92 %defattr(-,root,root)
93 %{_mingw32_bindir}/libvirt-0.dll
94 %{_mingw32_bindir}/virsh.exe
95
96 %{_mingw32_libdir}/libvirt.dll.a
97 %{_mingw32_libdir}/libvirt.la
98 %{_mingw32_libdir}/pkgconfig/libvirt.pc
99
100 %{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
101
102 %dir %{_mingw32_includedir}/libvirt
103 %{_mingw32_includedir}/libvirt/libvirt.h
104 %{_mingw32_includedir}/libvirt/virterror.h
105
106 %{_mingw32_mandir}/man1/virsh.1*
107
108
109 %changelog
110 * Thu Oct 16 2008 Richard Jones <rjones@redhat.com> - 0.4.6-7
111 - Windows icon patch from
112   https://www.redhat.com/archives/libvir-list/2008-October/msg00331.html
113
114 * Wed Oct 15 2008 Richard Jones <rjones@redhat.com> - 0.4.6-6
115 - Add patches from
116   https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html
117 - BR mingw32-portablexdr >= 4.0.11 to fix serious Windows endianness bug.
118
119 * Tue Oct 14 2008 Richard Jones <rjones@redhat.com> - 0.4.6-4
120 - +BR mingw32-readline.
121
122 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 0.4.6-3
123 - BuildArch should be noarch
124
125 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-2
126 - Whitespace removal.
127
128 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-1
129 - New upstream release 0.4.6.
130 - Rename mingw -> mingw32.
131
132 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-4%{?extra_release}
133 - Import crash fix from rawhide
134
135 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-3%{?extra_release}
136 - Add dep on gettext & pkgconfig
137
138 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.5-2
139 - Remove static lib.
140
141 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-1
142 - Initial RPM release, largely based on earlier work from several sources.