1 | %define name libxml2-python
|
---|
2 | %define version 2.7.7
|
---|
3 | %define unmangled_version 2.7.7
|
---|
4 |
|
---|
5 | Summary: libxml2 package
|
---|
6 | Name: %{name}
|
---|
7 | Version: %{version}
|
---|
8 | Release: 6%{?dist}
|
---|
9 | Source: libxml2-%{version}.tar.gz
|
---|
10 | #Source1: %{name}-%{unmangled_version}.tar.gz
|
---|
11 | License: MIT Licence
|
---|
12 | Group: Development/Libraries
|
---|
13 | Prefix: %{_prefix}
|
---|
14 | Vendor: Daniel Veillard <veillard@redhat.com>
|
---|
15 | Url: http://xmlsoft.org/python.html
|
---|
16 |
|
---|
17 | Patch1: libxml2-os2.diff
|
---|
18 |
|
---|
19 | BuildRequires: libxml2-devel python-devel
|
---|
20 | #BuildRequires: python-xml
|
---|
21 | BuildRoot: %{_tmppath}/libxml2-%{version}-%{release}-buildroot
|
---|
22 |
|
---|
23 | Requires: libxml2 = %{version}
|
---|
24 | Requires: python
|
---|
25 | Requires: python(abi) = 2.7
|
---|
26 |
|
---|
27 | %description
|
---|
28 | The libxml2-python package contains a module that permits applications
|
---|
29 | written in the Python programming language to use the interface
|
---|
30 | supplied by the libxml2 library to manipulate XML files.
|
---|
31 |
|
---|
32 | This library allows manipulation of XML files. It includes support for
|
---|
33 | reading, modifying, and writing XML and HTML files. There is DTD
|
---|
34 | support that includes parsing and validation even with complex DTDs,
|
---|
35 | either at parse time or later once the document has been modified.
|
---|
36 |
|
---|
37 | %prep
|
---|
38 | %setup -q -n libxml2-%{unmangled_version}
|
---|
39 | %patch001 -p1 -b .os2~
|
---|
40 |
|
---|
41 | %build
|
---|
42 | cd python
|
---|
43 | env CFLAGS="$RPM_OPT_FLAGS" python setup.py build
|
---|
44 |
|
---|
45 | %install
|
---|
46 | cd python
|
---|
47 | python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
|
---|
48 | # temporary workaround for wrong paths http://trac.netlabs.org/rpm/ticket/71
|
---|
49 | mkdir $RPM_BUILD_ROOT/@unixroot
|
---|
50 | mv $RPM_BUILD_ROOT/USR $RPM_BUILD_ROOT/@unixroot/usr
|
---|
51 | sed -e 's#/USR/#/@unixroot/usr/#g' -i INSTALLED_FILES
|
---|
52 |
|
---|
53 | %clean
|
---|
54 | rm -rf $RPM_BUILD_ROOT
|
---|
55 |
|
---|
56 | %files -f python/INSTALLED_FILES
|
---|
57 | %defattr(-,root,root)
|
---|
58 |
|
---|
59 | %changelog
|
---|
60 | * Tue Apr 08 2014 yd
|
---|
61 | - workaround for http://trac.netlabs.org/rpm/ticket/71
|
---|
62 |
|
---|
63 | * Mon Apr 07 2014 yd
|
---|
64 | - build for python 2.7.
|
---|
65 |
|
---|
66 | * Mon Jan 16 2012 yd
|
---|
67 | - rebuild with libc 0.6.4 runtime.
|
---|