| 1 | # remove the comment below, when we have python3 support
|
|---|
| 2 | #global with_python3 1
|
|---|
| 3 |
|
|---|
| 4 | Summary: Library providing XML and HTML support
|
|---|
| 5 | Name: libxml2
|
|---|
| 6 | Version: 2.9.4
|
|---|
| 7 | Release: 3%{?dist}
|
|---|
| 8 | License: MIT
|
|---|
| 9 | Group: Development/Libraries
|
|---|
| 10 | URL: http://xmlsoft.org/
|
|---|
| 11 | Vendor: bww bitwise works GmbH
|
|---|
| 12 |
|
|---|
| 13 | %scm_source svn http://svn.netlabs.org/repos/ports/xml2/trunk 2188
|
|---|
| 14 |
|
|---|
| 15 | # DEF files to create forwarders for the legacy package
|
|---|
| 16 | Source10: libxml2.def
|
|---|
| 17 |
|
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|---|
| 19 | BuildRequires: python-devel
|
|---|
| 20 | %if 0%{?with_python3}
|
|---|
| 21 | BuildRequires: python3-devel
|
|---|
| 22 | %endif # with_python3
|
|---|
| 23 | BuildRequires: zlib-devel
|
|---|
| 24 | BuildRequires: pkgconfig
|
|---|
| 25 | #BuildRequires: xz-devel
|
|---|
| 26 | Requires: libcx >= 0.4
|
|---|
| 27 |
|
|---|
| 28 | %description
|
|---|
| 29 | This library allows to manipulate XML files. It includes support
|
|---|
| 30 | to read, modify and write XML and HTML files. There is DTDs support
|
|---|
| 31 | this includes parsing and validation even with complex DtDs, either
|
|---|
| 32 | at parse time or later once the document has been modified. The output
|
|---|
| 33 | can be a simple SAX stream or and in-memory DOM like representations.
|
|---|
| 34 | In this case one can use the built-in XPath and XPointer implementation
|
|---|
| 35 | to select subnodes or ranges. A flexible Input/Output mechanism is
|
|---|
| 36 | available, with existing HTTP and FTP modules and combined to an
|
|---|
| 37 | URI library.
|
|---|
| 38 |
|
|---|
| 39 | %package devel
|
|---|
| 40 | Summary: Libraries, includes, etc. to develop XML and HTML applications
|
|---|
| 41 | Group: Development/Libraries
|
|---|
| 42 | Requires: libxml2 = %{version}-%{release}
|
|---|
| 43 | Requires: zlib-devel
|
|---|
| 44 | #Requires: xz-devel
|
|---|
| 45 | Requires: pkgconfig
|
|---|
| 46 |
|
|---|
| 47 | %description devel
|
|---|
| 48 | Libraries, include files, etc you can use to develop XML applications.
|
|---|
| 49 | This library allows to manipulate XML files. It includes support
|
|---|
| 50 | to read, modify and write XML and HTML files. There is DTDs support
|
|---|
| 51 | this includes parsing and validation even with complex DtDs, either
|
|---|
| 52 | at parse time or later once the document has been modified. The output
|
|---|
| 53 | can be a simple SAX stream or and in-memory DOM like representations.
|
|---|
| 54 | In this case one can use the built-in XPath and XPointer implementation
|
|---|
| 55 | to select subnodes or ranges. A flexible Input/Output mechanism is
|
|---|
| 56 | available, with existing HTTP and FTP modules and combined to an
|
|---|
| 57 | URI library.
|
|---|
| 58 |
|
|---|
| 59 | %package static
|
|---|
| 60 | Summary: Static library for libxml2
|
|---|
| 61 | Group: Development/Libraries
|
|---|
| 62 | Requires: libxml2 = %{version}-%{release}
|
|---|
| 63 |
|
|---|
| 64 | %description static
|
|---|
| 65 | Static library for libxml2 provided for specific uses or shaving a few
|
|---|
| 66 | microseconds when parsing, do not link to them for generic purpose packages.
|
|---|
| 67 |
|
|---|
| 68 | %package -n python-%{name}
|
|---|
| 69 | Summary: Python bindings for the libxml2 library
|
|---|
| 70 | Group: Development/Libraries
|
|---|
| 71 | Requires: libxml2 = %{version}-%{release}
|
|---|
| 72 | Obsoletes: %{name}-python < %{version}-%{release}
|
|---|
| 73 | Provides: %{name}-python = %{version}-%{release}
|
|---|
| 74 |
|
|---|
| 75 | %description -n python-%{name}
|
|---|
| 76 | The libxml2-python package contains a Python 2 module that permits applications
|
|---|
| 77 | written in the Python programming language, version 2, to use the interface
|
|---|
| 78 | supplied by the libxml2 library to manipulate XML files.
|
|---|
| 79 |
|
|---|
| 80 | This library allows to manipulate XML files. It includes support
|
|---|
| 81 | to read, modify and write XML and HTML files. There is DTDs support
|
|---|
| 82 | this includes parsing and validation even with complex DTDs, either
|
|---|
| 83 | at parse time or later once the document has been modified.
|
|---|
| 84 |
|
|---|
| 85 | %if 0%{?with_python3}
|
|---|
| 86 | %package -n python3-%{name}
|
|---|
| 87 | Summary: Python 3 bindings for the libxml2 library
|
|---|
| 88 | Group: Development/Libraries
|
|---|
| 89 | Requires: libxml2 = %{version}-%{release}
|
|---|
| 90 | Obsoletes: %{name}-python3 < %{version}-%{release}
|
|---|
| 91 | Provides: %{name}-python3 = %{version}-%{release}
|
|---|
| 92 |
|
|---|
| 93 | %description -n python3-%{name}
|
|---|
| 94 | The libxml2-python3 package contains a Python 3 module that permits
|
|---|
| 95 | applications written in the Python programming language, version 3, to use the
|
|---|
| 96 | interface supplied by the libxml2 library to manipulate XML files.
|
|---|
| 97 |
|
|---|
| 98 | This library allows to manipulate XML files. It includes support
|
|---|
| 99 | to read, modify and write XML and HTML files. There is DTDs support
|
|---|
| 100 | this includes parsing and validation even with complex DTDs, either
|
|---|
| 101 | at 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.
|
|---|
| 110 | for m in %{SOURCE10}; do
|
|---|
| 111 | cp ${m} .
|
|---|
| 112 | done
|
|---|
| 113 |
|
|---|
| 114 | %if 0%{?with_python3}
|
|---|
| 115 | mkdir py3doc
|
|---|
| 116 | cp doc/*.py py3doc
|
|---|
| 117 | sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
|
|---|
| 118 | %endif
|
|---|
| 119 |
|
|---|
| 120 | export NOCONFIGURE=1
|
|---|
| 121 | autogen.sh
|
|---|
| 122 |
|
|---|
| 123 | %build
|
|---|
| 124 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 125 | export LIBS="-lcx"
|
|---|
| 126 | export VENDOR="%{vendor}"
|
|---|
| 127 | %configure
|
|---|
| 128 |
|
|---|
| 129 | make %{?smp_mflags}
|
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 | %install
|
|---|
| 133 | rm -fr %{buildroot}
|
|---|
| 134 |
|
|---|
| 135 | make install DESTDIR=%{buildroot}
|
|---|
| 136 |
|
|---|
| 137 | %if 0%{?with_python3}
|
|---|
| 138 | make clean
|
|---|
| 139 | %configure --with-python=%{__python3}
|
|---|
| 140 | make install DESTDIR=%{buildroot}
|
|---|
| 141 | %endif # with_python3
|
|---|
| 142 |
|
|---|
| 143 | # multiarch crazyness on timestamp differences or Makefile/binaries for examples
|
|---|
| 144 | touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config
|
|---|
| 145 |
|
|---|
| 146 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 147 | rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
|---|
| 148 | rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
|---|
| 149 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
|
|---|
| 150 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
|
|---|
| 151 | (cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
|---|
| 152 | gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
|---|
| 153 |
|
|---|
| 154 | # Generate & install forwarder DLLs.
|
|---|
| 155 | gcc -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
|
|---|
| 158 | ln -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
|
|---|
| 164 | rm -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 | * Thu May 04 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-3
|
|---|
| 241 | - prefix /etc path with /@unixroot
|
|---|
| 242 | - use the new scm_source and scm_setup macros
|
|---|
| 243 |
|
|---|
| 244 | * Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-2
|
|---|
| 245 | - add -nostdlib to forwarders, to need less heap
|
|---|
| 246 |
|
|---|
| 247 | * Fri Nov 25 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.9.4-1
|
|---|
| 248 | - update to version 2.9.4
|
|---|
| 249 | - adjust to the current toolchain
|
|---|
| 250 | - build and install the python binding within this spec as well
|
|---|
| 251 |
|
|---|
| 252 | * Mon Apr 07 2014 yd
|
|---|
| 253 | - build for python 2.7.
|
|---|
| 254 | - added debug package with symbolic info for exceptq.
|
|---|
| 255 |
|
|---|
| 256 | * Mon Jan 16 2012 yd
|
|---|
| 257 | - rebuild with libc 0.6.4 runtime.
|
|---|