]>
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} |
3fc69630 | 5 | Version: 2.9.0 |
bae24ee6 | 6 | Release: 1 |
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 |
3fc69630 | 11 | # Source0-md5: 5b9bebf4f5d2200ae2c4efe8fa6103f7 |
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 |
3fc69630 | 20 | BuildRequires: libtool >= 2:2.0 |
bae24ee6 | 21 | BuildRequires: sed >= 4.0 |
d43adb62 | 22 | Requires: crossmingw32-zlib >= 1.2.4-3 |
bae24ee6 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %define no_install_post_strip 1 | |
26 | ||
27 | %define target i386-mingw32 | |
28 | %define target_platform i386-pc-mingw32 | |
bae24ee6 | 29 | |
30 | %define _sysprefix /usr | |
31 | %define _prefix %{_sysprefix}/%{target} | |
b33e056f | 32 | %define _libdir %{_prefix}/lib |
bae24ee6 | 33 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
a338d023 | 34 | %define _dlldir /usr/share/wine/windows/system |
bae24ee6 | 35 | %define __cc %{target}-gcc |
36 | %define __cxx %{target}-g++ | |
5d33cd62 | 37 | %define filterout_ld -Wl,--as-needed -Wl,-z,relro -Wl,-z,combreloc |
bae24ee6 | 38 | |
39 | %description | |
40 | This library allows you to manipulate XML files. | |
41 | ||
a338d023 | 42 | This package contains the cross version for Win32. |
bae24ee6 | 43 | |
44 | %description -l pl.UTF-8 | |
45 | Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML. | |
46 | ||
a338d023 JB |
47 | Ten pakiet zawiera wersję skrośną dla Win32. |
48 | ||
49 | %package static | |
254c0603 JB |
50 | Summary: Static libxml2 library (cross MinGW32 version) |
51 | Summary(pl.UTF-8): Statyczna biblioteka libxml2 (wersja skrośna MinGW32) | |
a338d023 JB |
52 | Group: Development/Libraries |
53 | Requires: %{name} = %{version}-%{release} | |
54 | ||
55 | %description static | |
254c0603 | 56 | Static libxml2 library (cross MinGW32 version). |
a338d023 JB |
57 | |
58 | %description static -l pl.UTF-8 | |
254c0603 | 59 | Statyczna biblioteka libxml2 (wersja skrośna MinGW32). |
a338d023 JB |
60 | |
61 | %package dll | |
62 | Summary: DLL libxml2 library for Windows | |
63 | Summary(pl.UTF-8): Biblioteka DLL libxml2 dla Windows | |
64 | Group: Applications/Emulators | |
d43adb62 | 65 | Requires: crossmingw32-zlib-dll >= 1.2.4-3 |
a338d023 JB |
66 | Requires: wine |
67 | ||
68 | %description dll | |
69 | DLL libxml2 library for Windows. | |
70 | ||
71 | %description dll -l pl.UTF-8 | |
72 | Biblioteka DLL libxml2 dla Windows. | |
bae24ee6 | 73 | |
74 | %prep | |
d6d063a5 | 75 | %setup -q -n %{realname}-%{version} |
bae24ee6 | 76 | %patch0 -p1 |
77 | %patch1 -p1 | |
78 | %patch2 -p1 | |
bae24ee6 | 79 | |
80 | %build | |
bae24ee6 | 81 | %{__libtoolize} |
82 | %{__aclocal} | |
83 | %{__autoconf} | |
84 | %{__autoheader} | |
85 | %{__automake} | |
86 | %configure \ | |
87 | --target=%{target} \ | |
88 | --host=%{target} \ | |
2d77eca5 | 89 | --disable-silent-rules \ |
a338d023 | 90 | --without-python |
bae24ee6 | 91 | |
92 | %{__make} | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %{__make} install \ | |
a338d023 | 98 | DESTDIR=$RPM_BUILD_ROOT |
bae24ee6 | 99 | |
a338d023 JB |
100 | install -d $RPM_BUILD_ROOT%{_dlldir} |
101 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
102 | ||
103 | %if 0%{!?debug:1} | |
104 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
105 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
106 | %endif | |
107 | ||
2d77eca5 | 108 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gtk-doc,man} |
bae24ee6 | 109 | |
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS ChangeLog Copyright NEWS README TODO | |
a338d023 JB |
116 | %{_libdir}/libxml2.dll.a |
117 | %{_libdir}/libxml2.la | |
118 | %{_includedir}/libxml2 | |
119 | %{_pkgconfigdir}/libxml-2.0.pc | |
bae24ee6 | 120 | |
a338d023 JB |
121 | %files static |
122 | %defattr(644,root,root,755) | |
123 | %{_libdir}/libxml2.a | |
bae24ee6 | 124 | |
a338d023 JB |
125 | %files dll |
126 | %defattr(644,root,root,755) | |
127 | %{_dlldir}/libxml2-*.dll |