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