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