source: spec/trunk/SPECS/libxml2.spec@ 1566

Last change on this file since 1566 was 1561, checked in by Silvan Scherrer, 7 years ago

spec: libxml2: Release version 2.9.8-2.

  • Property svn:eol-style set to native
File size: 8.0 KB
Line 
1# remove the comment below, when we have python3 support
2#global with_python3 1
3
4Summary: Library providing XML and HTML support
5Name: libxml2
6Version: 2.9.8
7Release: 2%{?dist}
8License: MIT
9Group: Development/Libraries
10URL: http://xmlsoft.org/
11Vendor: bww bitwise works GmbH
12
13%scm_source github http://github.com/bitwiseworks/%{name}-os2 master
14
15# DEF files to create forwarders for the legacy package
16Source10: libxml2.def
17
18BuildRoot: %{_tmppath}/%{name}-%{version}-root
19BuildRequires: python-devel
20%if 0%{?with_python3}
21BuildRequires: python3-devel
22%endif # with_python3
23BuildRequires: zlib-devel
24BuildRequires: pkgconfig
25#BuildRequires: xz-devel
26Requires: libcx >= 0.4
27
28%description
29This library allows to manipulate XML files. It includes support
30to read, modify and write XML and HTML files. There is DTDs support
31this includes parsing and validation even with complex DtDs, either
32at parse time or later once the document has been modified. The output
33can be a simple SAX stream or and in-memory DOM like representations.
34In this case one can use the built-in XPath and XPointer implementation
35to select subnodes or ranges. A flexible Input/Output mechanism is
36available, with existing HTTP and FTP modules and combined to an
37URI library.
38
39%package devel
40Summary: Libraries, includes, etc. to develop XML and HTML applications
41Group: Development/Libraries
42Requires: libxml2 = %{version}-%{release}
43Requires: zlib-devel
44#Requires: xz-devel
45Requires: pkgconfig
46
47%description devel
48Libraries, include files, etc you can use to develop XML applications.
49This library allows to manipulate XML files. It includes support
50to read, modify and write XML and HTML files. There is DTDs support
51this includes parsing and validation even with complex DtDs, either
52at parse time or later once the document has been modified. The output
53can be a simple SAX stream or and in-memory DOM like representations.
54In this case one can use the built-in XPath and XPointer implementation
55to select subnodes or ranges. A flexible Input/Output mechanism is
56available, with existing HTTP and FTP modules and combined to an
57URI library.
58
59%package static
60Summary: Static library for libxml2
61Group: Development/Libraries
62Requires: libxml2 = %{version}-%{release}
63
64%description static
65Static library for libxml2 provided for specific uses or shaving a few
66microseconds when parsing, do not link to them for generic purpose packages.
67
68%package -n python-%{name}
69Summary: Python bindings for the libxml2 library
70Group: Development/Libraries
71Requires: libxml2 = %{version}-%{release}
72Obsoletes: %{name}-python < %{version}-%{release}
73Provides: %{name}-python = %{version}-%{release}
74
75%description -n python-%{name}
76The libxml2-python package contains a Python 2 module that permits applications
77written in the Python programming language, version 2, to use the interface
78supplied by the libxml2 library to manipulate XML files.
79
80This library allows to manipulate XML files. It includes support
81to read, modify and write XML and HTML files. There is DTDs support
82this includes parsing and validation even with complex DTDs, either
83at parse time or later once the document has been modified.
84
85%if 0%{?with_python3}
86%package -n python3-%{name}
87Summary: Python 3 bindings for the libxml2 library
88Group: Development/Libraries
89Requires: libxml2 = %{version}-%{release}
90Obsoletes: %{name}-python3 < %{version}-%{release}
91Provides: %{name}-python3 = %{version}-%{release}
92
93%description -n python3-%{name}
94The libxml2-python3 package contains a Python 3 module that permits
95applications written in the Python programming language, version 3, to use the
96interface supplied by the libxml2 library to manipulate XML files.
97
98This library allows to manipulate XML files. It includes support
99to read, modify and write XML and HTML files. There is DTDs support
100this includes parsing and validation even with complex DTDs, either
101at parse time or later once the document has been modified.
102%endif # with_python3
103
104%debug_package
105
106%prep
107%scm_setup
108
109# Prepare forwarder DLLs.
110for m in %{SOURCE10}; do
111 cp ${m} .
112done
113
114%if 0%{?with_python3}
115mkdir py3doc
116cp doc/*.py py3doc
117sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
118%endif
119
120export NOCONFIGURE=1
121autogen.sh
122
123%build
124export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
125export LIBS="-lcx"
126export VENDOR="%{vendor}"
127%configure
128
129make %{?smp_mflags}
130
131
132%install
133rm -fr %{buildroot}
134
135make install DESTDIR=%{buildroot}
136
137%if 0%{?with_python3}
138make clean
139%configure --with-python=%{__python3}
140make install DESTDIR=%{buildroot}
141%endif # with_python3
142
143# multiarch crazyness on timestamp differences or Makefile/binaries for examples
144touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config
145
146rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
147rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
148rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
149rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
150rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
151(cd doc/examples ; make clean ; rm -rf .deps Makefile)
152gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
153
154# Generate & install forwarder DLLs.
155gcc -Zomf -Zdll -nostdlib libxml2.def -l$RPM_BUILD_ROOT/%{_libdir}/xml22.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/libxml2.dll
156
157# create a symlink for the python binding, as the dll itself is named xml2mod.dll
158ln -s %{_libdir}/python2.7/site-packages/xml2mod.dll $RPM_BUILD_ROOT%{_libdir}/python2.7/site-packages/libxml2mod.pyd
159
160%check
161#make runtests
162
163%clean
164rm -fr %{buildroot}
165
166#%post -p /sbin/ldconfig
167
168#%postun -p /sbin/ldconfig
169
170%files
171%defattr(-, root, root)
172
173%{!?_licensedir:%global license %%doc}
174%license Copyright
175%doc AUTHORS NEWS README TODO
176%doc %{_mandir}/man1/xmllint.1*
177%doc %{_mandir}/man1/xmlcatalog.1*
178%doc %{_mandir}/man3/libxml.3*
179
180%{_libdir}/xml2*.dll
181%{_bindir}/xmllint.exe
182%{_bindir}/xmlcatalog.exe
183#forwarder dll
184%{_libdir}/libxml2.dll
185
186%files devel
187%defattr(-, root, root)
188
189%doc %{_mandir}/man1/xml2-config.1*
190%doc AUTHORS NEWS README Copyright
191%doc doc/*.html doc/html doc/*.gif doc/*.png
192%doc doc/tutorial doc/libxml2-api.xml.gz
193%doc doc/examples
194%doc %dir %{_datadir}/gtk-doc/html/libxml2
195%doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
196%doc %{_datadir}/gtk-doc/html/libxml2/*.html
197%doc %{_datadir}/gtk-doc/html/libxml2/*.png
198%doc %{_datadir}/gtk-doc/html/libxml2/*.css
199
200%{_libdir}/xml2*_dll.a
201%{_libdir}/*.sh
202%{_includedir}/*
203%{_bindir}/xml2-config
204%{_datadir}/aclocal/libxml.m4
205%{_libdir}/pkgconfig/libxml-2.0.pc
206%{_libdir}/cmake/libxml2/libxml2-config.cmake
207
208%files static
209%defattr(-, root, root)
210
211%{_libdir}/xml2.a
212
213%files -n python-%{name}
214%defattr(-, root, root)
215
216%{_libdir}/python2*/site-packages/libxml2.py*
217%{_libdir}/python2*/site-packages/drv_libxml2.py*
218%{_libdir}/python2*/site-packages/libxml2mod*
219%{_libdir}/python2*/site-packages/xml2mod.dll
220%doc python/TODO
221%doc python/libxml2class.txt
222%doc doc/*.py
223%doc doc/python.html
224
225%if 0%{?with_python3}
226%files -n python3-%{name}
227%defattr(-, root, root)
228
229%{_libdir}/python3*/site-packages/libxml2.py*
230%{_libdir}/python3*/site-packages/drv_libxml2.py*
231%{_libdir}/python3*/site-packages/__pycache__/*py*
232%{_libdir}/python3*/site-packages/libxml2mod*
233%doc python/TODO
234%doc python/libxml2class.txt
235%doc py3doc/*.py
236%doc doc/python.html
237%endif # with_python3
238
239%changelog
240* Fri Jan 18 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.8-2
241- enable file:// with drive letters
242
243* Thu Jul 26 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.8-1
244- update to vendor version 2.9.8
245- moved source to github
246
247* Thu May 04 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-3
248- prefix /etc path with /@unixroot
249- use the new scm_source and scm_setup macros
250
251* Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-2
252- add -nostdlib to forwarders, to need less heap
253
254* Fri Nov 25 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-1
255- update to version 2.9.4
256- adjust to the current toolchain
257- build and install the python binding within this spec as well
258
259* Mon Apr 07 2014 yd
260- build for python 2.7.
261- added debug package with symbolic info for exceptq.
262
263* Mon Jan 16 2012 yd
264- rebuild with libc 0.6.4 runtime.
Note: See TracBrowser for help on using the repository browser.