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