]> git.pld-linux.org Git - packages/crossmingw32-libxml2.git/blob - crossmingw32-libxml2.spec
- updated to 2.9.9 (fixes CVE-2018-9251 CVE-2018-14404 CVE-2018-14567)
[packages/crossmingw32-libxml2.git] / crossmingw32-libxml2.spec
1 %define         realname   libxml2
2 Summary:        libXML library - cross MinGW32 version
3 Summary(pl.UTF-8):      Biblioteka libXML wersja 2 - wersja skrośna dla MinGW32
4 Name:           crossmingw32-%{realname}
5 Version:        2.9.9
6 Release:        1
7 License:        MIT
8 Group:          Development/Libraries
9 Source0:        ftp://xmlsoft.org/libxml2/%{realname}-%{version}.tar.gz
10 # Source0-md5:  c04a5a0a042eaa157e8e8c9eabe76bd6
11 Patch0:         %{realname}-man_fixes.patch
12 Patch1:         %{realname}-open.gz.patch
13 Patch2:         %{realname}-largefile.patch
14 URL:            http://xmlsoft.org/
15 BuildRequires:  autoconf >= 2.68
16 BuildRequires:  automake >= 1.4
17 BuildRequires:  crossmingw32-gcc
18 BuildRequires:  crossmingw32-zlib >= 1.2.4-3
19 BuildRequires:  crossmingw32-xz
20 BuildRequires:  libtool >= 2:2.0
21 BuildRequires:  sed >= 4.0
22 Requires:       crossmingw32-zlib >= 1.2.4-3
23 Requires:       crossmingw32-xz
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
30
31 %define         _sysprefix              /usr
32 %define         _prefix                 %{_sysprefix}/%{target}
33 %define         _libdir                 %{_prefix}/lib
34 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
35 %define         _dlldir                 /usr/share/wine/windows/system
36 %define         __cc                    %{target}-gcc
37 %define         __cxx                   %{target}-g++
38 %define         __pkgconfig_provides    %{nil}
39 %define         __pkgconfig_requires    %{nil}
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=]*
48
49 %description
50 This library allows you to manipulate XML files.
51
52 This package contains the cross version for Win32.
53
54 %description -l pl.UTF-8
55 Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML.
56
57 Ten pakiet zawiera wersję skrośną dla Win32.
58
59 %package static
60 Summary:        Static libxml2 library (cross MinGW32 version)
61 Summary(pl.UTF-8):      Statyczna biblioteka libxml2 (wersja skrośna MinGW32)
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64
65 %description static
66 Static libxml2 library (cross MinGW32 version).
67
68 %description static -l pl.UTF-8
69 Statyczna biblioteka libxml2 (wersja skrośna MinGW32).
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
75 Requires:       crossmingw32-zlib-dll >= 1.2.4-3
76 Requires:       crossmingw32-xz-dll
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.
84
85 %prep
86 %setup -q -n %{realname}-%{version}
87 %patch0 -p1
88 %patch1 -p1
89 %patch2 -p1
90
91 %build
92 %{__libtoolize}
93 %{__aclocal}
94 %{__autoconf}
95 %{__autoheader}
96 %{__automake}
97 # MinGW32 headers don't define this
98 CPPFLAGS="%{rpmcppflags} -D_WINSOCKAPI_"
99 %configure \
100         --target=%{target} \
101         --host=%{target} \
102         --disable-silent-rules \
103         --without-python
104
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %{__make} install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 install -d $RPM_BUILD_ROOT%{_dlldir}
114 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
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
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
124 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gtk-doc,man}
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
132 %{_libdir}/libxml2.dll.a
133 %{_libdir}/libxml2.la
134 %{_includedir}/libxml2
135 %{_pkgconfigdir}/libxml-2.0.pc
136
137 %files static
138 %defattr(644,root,root,755)
139 %{_libdir}/libxml2.a
140
141 %files dll
142 %defattr(644,root,root,755)
143 %{_dlldir}/libxml2-*.dll
This page took 0.081987 seconds and 3 git commands to generate.