]>
Commit | Line | Data |
---|---|---|
d6d063a5 | 1 | %define realname libxml2 |
254c0603 JB |
2 | Summary: libXML library - cross MinGW32 version |
3 | Summary(pl.UTF-8): Biblioteka libXML wersja 2 - wersja skrośna dla MinGW32 | |
d6d063a5 | 4 | Name: crossmingw32-%{realname} |
662cf5b0 | 5 | Version: 2.9.9 |
cae744c1 | 6 | Release: 1 |
bae24ee6 | 7 | License: MIT |
a338d023 | 8 | Group: Development/Libraries |
d6d063a5 | 9 | Source0: ftp://xmlsoft.org/libxml2/%{realname}-%{version}.tar.gz |
662cf5b0 | 10 | # Source0-md5: c04a5a0a042eaa157e8e8c9eabe76bd6 |
2d77eca5 JB |
11 | Patch0: %{realname}-man_fixes.patch |
12 | Patch1: %{realname}-open.gz.patch | |
13 | Patch2: %{realname}-largefile.patch | |
bae24ee6 | 14 | URL: http://xmlsoft.org/ |
3fc69630 | 15 | BuildRequires: autoconf >= 2.68 |
5d33cd62 | 16 | BuildRequires: automake >= 1.4 |
a338d023 | 17 | BuildRequires: crossmingw32-gcc |
d43adb62 | 18 | BuildRequires: crossmingw32-zlib >= 1.2.4-3 |
01436a0b | 19 | BuildRequires: crossmingw32-xz |
3fc69630 | 20 | BuildRequires: libtool >= 2:2.0 |
bae24ee6 | 21 | BuildRequires: sed >= 4.0 |
d43adb62 | 22 | Requires: crossmingw32-zlib >= 1.2.4-3 |
01436a0b | 23 | Requires: crossmingw32-xz |
bae24ee6 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %define no_install_post_strip 1 | |
27 | ||
28 | %define target i386-mingw32 | |
29 | %define target_platform i386-pc-mingw32 | |
bae24ee6 | 30 | |
31 | %define _sysprefix /usr | |
32 | %define _prefix %{_sysprefix}/%{target} | |
b33e056f | 33 | %define _libdir %{_prefix}/lib |
bae24ee6 | 34 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
a338d023 | 35 | %define _dlldir /usr/share/wine/windows/system |
bae24ee6 | 36 | %define __cc %{target}-gcc |
37 | %define __cxx %{target}-g++ | |
fa16681a | 38 | %define __pkgconfig_provides %{nil} |
6a93caa8 | 39 | %define __pkgconfig_requires %{nil} |
bb67111e JB |
40 | |
41 | %ifnarch %{ix86} | |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
43 | %define optflags -O2 | |
44 | %endif | |
45 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
46 | %define filterout_ld -Wl,--as-needed -Wl,-z,relro -Wl,-z,combreloc | |
47 | %define filterout_c -f[-a-z0-9=]* | |
bae24ee6 | 48 | |
49 | %description | |
50 | This library allows you to manipulate XML files. | |
51 | ||
a338d023 | 52 | This package contains the cross version for Win32. |
bae24ee6 | 53 | |
54 | %description -l pl.UTF-8 | |
55 | Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML. | |
56 | ||
a338d023 JB |
57 | Ten pakiet zawiera wersję skrośną dla Win32. |
58 | ||
59 | %package static | |
254c0603 JB |
60 | Summary: Static libxml2 library (cross MinGW32 version) |
61 | Summary(pl.UTF-8): Statyczna biblioteka libxml2 (wersja skrośna MinGW32) | |
a338d023 JB |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description static | |
254c0603 | 66 | Static libxml2 library (cross MinGW32 version). |
a338d023 JB |
67 | |
68 | %description static -l pl.UTF-8 | |
254c0603 | 69 | Statyczna biblioteka libxml2 (wersja skrośna MinGW32). |
a338d023 JB |
70 | |
71 | %package dll | |
72 | Summary: DLL libxml2 library for Windows | |
73 | Summary(pl.UTF-8): Biblioteka DLL libxml2 dla Windows | |
74 | Group: Applications/Emulators | |
d43adb62 | 75 | Requires: crossmingw32-zlib-dll >= 1.2.4-3 |
01436a0b | 76 | Requires: crossmingw32-xz-dll |
a338d023 JB |
77 | Requires: wine |
78 | ||
79 | %description dll | |
80 | DLL libxml2 library for Windows. | |
81 | ||
82 | %description dll -l pl.UTF-8 | |
83 | Biblioteka DLL libxml2 dla Windows. | |
bae24ee6 | 84 | |
85 | %prep | |
d6d063a5 | 86 | %setup -q -n %{realname}-%{version} |
bae24ee6 | 87 | %patch0 -p1 |
88 | %patch1 -p1 | |
89 | %patch2 -p1 | |
bae24ee6 | 90 | |
91 | %build | |
bae24ee6 | 92 | %{__libtoolize} |
93 | %{__aclocal} | |
94 | %{__autoconf} | |
95 | %{__autoheader} | |
96 | %{__automake} | |
73a03ebb JB |
97 | # MinGW32 headers don't define this |
98 | CPPFLAGS="%{rpmcppflags} -D_WINSOCKAPI_" | |
bae24ee6 | 99 | %configure \ |
100 | --target=%{target} \ | |
101 | --host=%{target} \ | |
2d77eca5 | 102 | --disable-silent-rules \ |
a338d023 | 103 | --without-python |
bae24ee6 | 104 | |
105 | %{__make} | |
106 | ||
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %{__make} install \ | |
a338d023 | 111 | DESTDIR=$RPM_BUILD_ROOT |
bae24ee6 | 112 | |
a338d023 | 113 | install -d $RPM_BUILD_ROOT%{_dlldir} |
73a03ebb | 114 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
a338d023 JB |
115 | |
116 | %if 0%{!?debug:1} | |
117 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
118 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
119 | %endif | |
120 | ||
73a03ebb JB |
121 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{*.exe,xml2-config} |
122 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/xml2Conf.sh | |
123 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake | |
2d77eca5 | 124 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gtk-doc,man} |
bae24ee6 | 125 | |
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %doc AUTHORS ChangeLog Copyright NEWS README TODO | |
a338d023 JB |
132 | %{_libdir}/libxml2.dll.a |
133 | %{_libdir}/libxml2.la | |
134 | %{_includedir}/libxml2 | |
135 | %{_pkgconfigdir}/libxml-2.0.pc | |
bae24ee6 | 136 | |
a338d023 JB |
137 | %files static |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libxml2.a | |
bae24ee6 | 140 | |
a338d023 JB |
141 | %files dll |
142 | %defattr(644,root,root,755) | |
143 | %{_dlldir}/libxml2-*.dll |