blob: 2fc4a6f6fed4137f7d05cad2d15db0010e62d3e1 [file] [log] [blame]
Daniel Veillard1a123612001-09-19 08:06:23 +00001Summary: Library providing XML and HTML support
2Name: libxml2
Daniel Veillardea898282001-11-04 22:13:45 +00003Version: @VERSION@
Daniel Veillarda7084cd2002-04-15 17:12:47 +00004Release: 1
Daniel Veillardc575b992002-02-08 13:28:40 +00005License: MIT
Daniel Veillard1a123612001-09-19 08:06:23 +00006Group: Development/Libraries
Daniel Veillardea898282001-11-04 22:13:45 +00007Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
8BuildRoot: %{_tmppath}/%{name}-%{version}-root
Daniel Veillard253aa2c2002-02-02 09:17:16 +00009BuildRequires: python python-devel
Daniel Veillard1a123612001-09-19 08:06:23 +000010URL: http://xmlsoft.org/
Daniel Veillardea898282001-11-04 22:13:45 +000011Prefix: %{_prefix}
12Docdir: %{_docdir}
Michael Fulbright62e8e801998-09-25 16:58:38 +000013
14%description
Daniel Veillard6db58192000-10-30 09:27:53 +000015This library allows to manipulate XML files. It includes support
16to read, modify and write XML and HTML files. There is DTDs support
17this includes parsing and validation even with complex DtDs, either
18at parse time or later once the document has been modified. The output
19can be a simple SAX stream or and in-memory DOM like representations.
20In this case one can use the built-in XPath and XPointer implementation
21to select subnodes or ranges. A flexible Input/Output mechanism is
22available, with existing HTTP and FTP modules and combined to an
23URI library.
Michael Fulbright62e8e801998-09-25 16:58:38 +000024
25%package devel
Daniel Veillard1a123612001-09-19 08:06:23 +000026Summary: Libraries, includes, etc. to develop XML and HTML applications
27Group: Development/Libraries
28Requires: libxml2 = %{version}
Daniel Veillardc6924812002-05-24 11:10:43 +000029Requires: zlib-devel
Michael Fulbright62e8e801998-09-25 16:58:38 +000030
31%description devel
Daniel Veillard6db58192000-10-30 09:27:53 +000032Libraries, include files, etc you can use to develop XML applications.
33This library allows to manipulate XML files. It includes support
34to read, modify and write XML and HTML files. There is DTDs support
35this includes parsing and validation even with complex DtDs, either
36at parse time or later once the document has been modified. The output
37can be a simple SAX stream or and in-memory DOM like representations.
38In this case one can use the built-in XPath and XPointer implementation
39to select subnodes or ranges. A flexible Input/Output mechanism is
40available, with existing HTTP and FTP modules and combined to an
41URI library.
Michael Fulbright62e8e801998-09-25 16:58:38 +000042
Daniel Veillard253aa2c2002-02-02 09:17:16 +000043%package python
44Summary: Python bindings for the libxml2 library
45Group: Development/Libraries
46Requires: libxml2 = %{version}
47Requires: python
48
49%description python
50The libxml2-python package contains a module that permits applications
51written in the Python programming language to use the interface
52supplied by the libxml2 library to manipulate XML files.
53
54This library allows to manipulate XML files. It includes support
55to read, modify and write XML and HTML files. There is DTDs support
56this includes parsing and validation even with complex DTDs, either
57at parse time or later once the document has been modified.
Daniel Veillardea898282001-11-04 22:13:45 +000058%prep
59%setup -q
60
61%build
62# Needed for snapshot releases.
63if [ ! -f configure ]; then
64%ifarch alpha
65 CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
66%else
67 CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
68%endif
69else
70%ifarch alpha
71 CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
72%else
73 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
74%endif
75fi
76
77if [ "$SMP" != "" ]; then
78 (make "MAKE=make -k -j $SMP"; exit 0)
79 make
80else
81 make
82fi
83
84%install
85rm -rf $RPM_BUILD_ROOT
86
87install -d $RPM_BUILD_ROOT%{_mandir}/man1
88install -d $RPM_BUILD_ROOT%{_mandir}/man4
89make prefix=$RPM_BUILD_ROOT%{prefix} mandir=$RPM_BUILD_ROOT%{_mandir} install
90
Daniel Veillard9589d452002-02-02 10:28:17 +000091#
92# this is a bit ugly but tries to generate the bindings for all versions
93# of python installed
94for i in %{prefix}/include/python*
95do
96 py_version=`echo $i | sed "s+%{prefix}/include/python++"`
97 if test -x %{prefix}/bin/python$py_version
98 then
99 echo generating bindings for Python $py_version
100 (cd python ; make clean ; \
101 make PYTHON="%{prefix}/bin/python$py_version" \
Daniel Veillardd2379012002-03-15 22:24:56 +0000102 PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
Daniel Veillard9589d452002-02-02 10:28:17 +0000103 PYTHON_VERSION="$py_version"; \
104 make PYTHON="%{prefix}/bin/python$py_version" \
Daniel Veillardd2379012002-03-15 22:24:56 +0000105 PYTHON_INCLUDES="%{prefix}/include/python$py_version" \
Daniel Veillard9589d452002-02-02 10:28:17 +0000106 PYTHON_VERSION="$py_version" \
107 prefix=$RPM_BUILD_ROOT%{prefix} \
108 mandir=$RPM_BUILD_ROOT%{_mandir} install)
109 fi
110done
Daniel Veillardea898282001-11-04 22:13:45 +0000111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%post -p /sbin/ldconfig
115
116%postun -p /sbin/ldconfig
117
118%files
119%defattr(-, root, root)
120
Daniel Veillardc575b992002-02-08 13:28:40 +0000121%doc AUTHORS ChangeLog NEWS README Copyright TODO
Daniel Veillardea898282001-11-04 22:13:45 +0000122%doc %{_mandir}/man1/xmllint.1*
123%doc %{_mandir}/man1/xmlcatalog.1*
Daniel Veillarde915b2d2002-03-06 18:42:40 +0000124%doc %{_mandir}/man3/libxml.3*
Daniel Veillardea898282001-11-04 22:13:45 +0000125
126%{prefix}/lib/lib*.so.*
127%{prefix}/bin/xmllint
128%{prefix}/bin/xmlcatalog
129
130%files devel
131%defattr(-, root, root)
132
133%doc %{_mandir}/man1/xml2-config.1*
Daniel Veillardc575b992002-02-08 13:28:40 +0000134%doc AUTHORS ChangeLog NEWS README Copyright TODO
Daniel Veillardf5a457a2002-03-07 10:25:29 +0000135%doc doc/*.html doc/html doc/*.gif doc/*.png
Daniel Veillardea898282001-11-04 22:13:45 +0000136
137%{prefix}/lib/lib*.so
138%{prefix}/lib/*a
139%{prefix}/lib/*.sh
140%{prefix}/include/*
141%{prefix}/bin/xml2-config
142%{prefix}/share/aclocal/libxml.m4
143%{prefix}/lib/pkgconfig/libxml-2.0.pc
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000144%files python
145%defattr(-, root, root)
146
Daniel Veillardc575b992002-02-08 13:28:40 +0000147%doc AUTHORS ChangeLog NEWS README Copyright
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000148%{prefix}/lib/python*/site-packages/libxml2.py
Daniel Veillard5e5c2d02002-02-09 18:03:01 +0000149%{prefix}/lib/python*/site-packages/libxml2mod.so
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000150%doc python/TODO
151%doc python/libxml2class.txt
152%doc python/tests/*.py
Michael Fulbright62e8e801998-09-25 16:58:38 +0000153
154%changelog
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000155* Fri Feb 1 2002 Daniel Veillard <veillard@redhat.com>
156
157- Added the python package
Michael Fulbright62e8e801998-09-25 16:58:38 +0000158
Daniel Veillardcd21dc72001-11-04 20:03:38 +0000159* Sun Nov 4 2001 Daniel Veillard <veillard@redhat.com>
160
Daniel Veillardea898282001-11-04 22:13:45 +0000161- cleaned up the specfile
Daniel Veillardcd21dc72001-11-04 20:03:38 +0000162- 2.4.7 broke SGML catalogs badly. this fixes it.
163
Daniel Veillard2913e4c2001-04-26 19:29:02 +0000164* Thu Apr 26 2001 Toshio Kuratomi <badger@prtr-13.ucsc.edu>
Daniel Veillard1a123612001-09-19 08:06:23 +0000165
166[2.3.7]
Daniel Veillard2913e4c2001-04-26 19:29:02 +0000167- Added libxml.m4 to the distribution file list
168- Moved the man pages from /usr/man to /usr/share/man to conform to FHS2.0
169- Moved programmer documentation into the devel package
170
Daniel Veillardc5d64342001-06-24 12:13:24 +0000171* Thu Sep 23 1999 Daniel Veillard <daniel@veillard.com>
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000172
173- corrected the spec file alpha stuff
174- switched to version 1.7.1
175- Added validation, XPath, nanohttp, removed memory leaks
176- Renamed CHAR to xmlChar
177
Daniel Veillardc5d64342001-06-24 12:13:24 +0000178* Wed Jun 2 1999 Daniel Veillard <daniel@veillard.com>
Daniel Veillard011b63c1999-06-02 17:44:04 +0000179
180- Switched to version 1.1: SAX extensions, better entities support, lots of
181 bug fixes.
182
Daniel Veillardc5d64342001-06-24 12:13:24 +0000183* Sun Oct 4 1998 Daniel Veillard <daniel@veillard.com>
Daniel Veillard8631b781998-10-04 14:50:58 +0000184
185- Added xml-config to the package
186
Michael Fulbright62e8e801998-09-25 16:58:38 +0000187* Thu Sep 24 1998 Michael Fulbright <msf@redhat.com>
188
189- Built release 0.30
Daniel Veillard1a123612001-09-19 08:06:23 +0000190