set eol-style:native
[reactos.git] / reactos / lib / libxml2 / libxml2.spec
1 Summary: Library providing XML and HTML support
2 Name: libxml2
3 Version: 2.6.20
4 Release: 1
5 License: MIT
6 Group: Development/Libraries
7 Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
8 BuildRoot: %{_tmppath}/%{name}-%{version}-root
9 BuildRequires: python python-devel zlib-devel
10 URL: http://xmlsoft.org/
11 Prefix: %{_prefix}
12 Docdir: %{_docdir}
13
14 %description
15 This library allows to manipulate XML files. It includes support
16 to read, modify and write XML and HTML files. There is DTDs support
17 this includes parsing and validation even with complex DtDs, either
18 at parse time or later once the document has been modified. The output
19 can be a simple SAX stream or and in-memory DOM like representations.
20 In this case one can use the built-in XPath and XPointer implementation
21 to select subnodes or ranges. A flexible Input/Output mechanism is
22 available, with existing HTTP and FTP modules and combined to an
23 URI library.
24
25 %package devel
26 Summary: Libraries, includes, etc. to develop XML and HTML applications
27 Group: Development/Libraries
28 Requires: libxml2 = %{version}
29 Requires: zlib-devel
30
31 %description devel
32 Libraries, include files, etc you can use to develop XML applications.
33 This library allows to manipulate XML files. It includes support
34 to read, modify and write XML and HTML files. There is DTDs support
35 this includes parsing and validation even with complex DtDs, either
36 at parse time or later once the document has been modified. The output
37 can be a simple SAX stream or and in-memory DOM like representations.
38 In this case one can use the built-in XPath and XPointer implementation
39 to select subnodes or ranges. A flexible Input/Output mechanism is
40 available, with existing HTTP and FTP modules and combined to an
41 URI library.
42
43 %package python
44 Summary: Python bindings for the libxml2 library
45 Group: Development/Libraries
46 Requires: libxml2 = %{version}
47 Requires: %{_libdir}/python%(echo `python -c "import sys; print sys.version[0:3]"`)
48
49 %description python
50 The libxml2-python package contains a module that permits applications
51 written in the Python programming language to use the interface
52 supplied by the libxml2 library to manipulate XML files.
53
54 This library allows to manipulate XML files. It includes support
55 to read, modify and write XML and HTML files. There is DTDs support
56 this includes parsing and validation even with complex DTDs, either
57 at parse time or later once the document has been modified.
58
59 %prep
60 %setup -q
61
62 %build
63 #
64 # try to use compiler profiling, based on Arjan van de Ven <arjanv@redhat.com>
65 # initial test spec. This really doesn't work okay for most tests done.
66 #
67 GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'`
68 if [ $GCC_VERSION -ge 34 ]
69 then
70 PROF_GEN='-fprofile-generate'
71 PROF_USE='-fprofile-use'
72 fi
73
74 if [ "$PROF_GEN" != "" ]
75 then
76 # First generate a profiling version
77 CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}" %configure
78 make
79 # Run a few sampling
80 make dba100000.xml
81 ./xmllint --noout dba100000.xml
82 ./xmllint --stream dba100000.xml
83 ./xmllint --noout --valid test/valid/REC-xml-19980210.xml
84 ./xmllint --stream --valid test/valid/REC-xml-19980210.xml
85 # Then generate code based on profile
86 CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}" %configure
87 make
88 else
89 %configure
90 make
91 fi
92 gzip -9 ChangeLog
93
94 %install
95 rm -fr %{buildroot}
96
97 %makeinstall
98 (cd doc/examples ; make clean ; rm -rf .deps)
99 gzip -9 doc/libxml2-api.xml
100 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
101
102 %clean
103 rm -fr %{buildroot}
104
105 %post
106 /sbin/ldconfig
107
108 %postun
109 /sbin/ldconfig
110
111 %files
112 %defattr(-, root, root)
113
114 %doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
115 %doc %{_mandir}/man1/xmllint.1*
116 %doc %{_mandir}/man1/xmlcatalog.1*
117 %doc %{_mandir}/man3/libxml.3*
118
119 %{_libdir}/lib*.so.*
120 %{prefix}/bin/xmllint
121 %{prefix}/bin/xmlcatalog
122
123 %files devel
124 %defattr(-, root, root)
125
126 %doc %{_mandir}/man1/xml2-config.1*
127 %doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
128 %doc doc/*.html doc/html doc/*.gif doc/*.png
129 %doc doc/tutorial doc/libxml2-api.xml.gz
130 %doc doc/examples
131
132 %{_libdir}/lib*.so
133 %{_libdir}/*a
134 %{_libdir}/*.sh
135 %{prefix}/include/*
136 %{prefix}/bin/xml2-config
137 %{prefix}/share/aclocal/libxml.m4
138 %{_libdir}/pkgconfig/libxml-2.0.pc
139 %files python
140 %defattr(-, root, root)
141
142 %doc AUTHORS ChangeLog.gz NEWS README Copyright
143 %{_libdir}/python*/site-packages/libxml2.py
144 %{_libdir}/python*/site-packages/drv_libxml2.py
145 %{_libdir}/python*/site-packages/libxml2mod*
146 %doc python/TODO
147 %doc python/libxml2class.txt
148 %doc python/tests/*.py
149 %doc doc/*.py
150 %doc doc/python.html
151
152 %changelog
153 * Mon Jul 11 2005 Daniel Veillard <veillard@redhat.com>
154 - upstream release 2.6.20 see http://xmlsoft.org/news.html
155
156 * Thu Jan 2 2003 Daniel Veillard <veillard@redhat.com>
157 - integrated drv_libxml2 xml.sax driver from Stéphane Bidoul
158 - provides the new XmlTextReader interfaces based on C# XML APIs
159
160 * Wed Oct 23 2002 Daniel Veillard <veillard@redhat.com>
161 - revamped the spec file, cleaned up some rpm building problems
162
163 * Fri Oct 4 2002 Jeremy Katz <katzj@redhat.com>
164 - build with 'make LIBTOOL=/usr/bin/libtool' to use system libtool
165
166 * Wed Sep 4 2002 Daniel Veillard <veillard@redhat.com>
167
168 - library paths fixed for x86-64
169
170 * Fri Feb 1 2002 Daniel Veillard <veillard@redhat.com>
171
172 - Added the python package
173
174 * Sun Nov 4 2001 Daniel Veillard <veillard@redhat.com>
175
176 - cleaned up the specfile
177 - 2.4.7 broke SGML catalogs badly. this fixes it.
178
179 * Thu Apr 26 2001 Toshio Kuratomi <badger@prtr-13.ucsc.edu>
180
181 [2.3.7]
182 - Added libxml.m4 to the distribution file list
183 - Moved the man pages from /usr/man to /usr/share/man to conform to FHS2.0
184 - Moved programmer documentation into the devel package
185
186 * Thu Sep 23 1999 Daniel Veillard <daniel@veillard.com>
187
188 - corrected the spec file alpha stuff
189 - switched to version 1.7.1
190 - Added validation, XPath, nanohttp, removed memory leaks
191 - Renamed CHAR to xmlChar
192
193 * Wed Jun 2 1999 Daniel Veillard <daniel@veillard.com>
194
195 - Switched to version 1.1: SAX extensions, better entities support, lots of
196 bug fixes.
197
198 * Sun Oct 4 1998 Daniel Veillard <daniel@veillard.com>
199
200 - Added xml-config to the package
201
202 * Thu Sep 24 1998 Michael Fulbright <msf@redhat.com>
203
204 - Built release 0.30
205