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