4ada01532a9f11d923f828cc6042d0b8b08b1839
[platform/upstream/libxml2.git] / packaging / libxml2.spec
1 Name:           libxml2
2 Version:        2.9.2
3 Release:        0
4 Summary:        A Library to Manipulate XML Files
5 License:        MIT
6 Group:          System/Libraries
7 Url:            http://xmlsoft.org
8 # Source ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz changes every day
9 Source:         ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
10 Source2:        baselibs.conf
11 Source1001:     libxml2.manifest
12 BuildRequires:  pkg-config
13 BuildRequires:  readline-devel
14 BuildRequires:  xz-devel
15 BuildRequires:  zlib-devel
16
17 %description
18 The XML C library was initially developed for the GNOME project. It is
19 now used by many programs to load and save extensible data structures
20 or manipulate any kind of XML files.
21
22 This library implements a number of existing standards related to
23 markup languages, including the XML standard, name spaces in XML, XML
24 Base, RFC 2396, XPath, XPointer, HTML4, XInclude, SGML catalogs, and
25 XML catalogs. In most cases, libxml tries to implement the
26 specification in a rather strict way. To some extent, it provides
27 support for the following specifications, but does not claim to
28 implement them: DOM, FTP client, HTTP client, and SAX.
29
30 The library also supports RelaxNG. Support for W3C XML Schemas is in
31 progress.
32
33
34 %package tools
35 Summary:        Tools using libxml
36 Group:          System/Libraries
37
38 %description tools
39 This package contains xmllint, a very useful tool proving libxml's power.
40
41 %package devel
42 Summary:        Include Files and Libraries mandatory for Development
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}
45 Requires:       %{name}-tools = %{version}
46 Requires:       glibc-devel
47 Requires:       readline-devel
48 Requires:       xz-devel
49 Requires:       zlib-devel
50
51 %description devel
52 This package contains all necessary include files and libraries needed
53 to develop applications that require these.
54
55 %prep
56 %setup -q
57 cp %{SOURCE1001} .
58
59 %build
60 touch configure.ac aclocal.m4 configure Makefile.am Makefile.in
61 %configure --disable-static \
62     --docdir=%_docdir/%name \
63     --with-html-dir=%_docdir/%name/html \
64     --with-fexceptions \
65     --with-history \
66     --without-python \
67     --enable-ipv6 \
68     --with-sax1 \
69     --with-regexps \
70     --with-threads \
71     --with-reader \
72     --with-http
73
74 make %{?_smp_mflags} BASE_DIR="%_docdir" DOC_MODULE="%name"
75
76 %check
77 # qemu-arm can't keep up atm, disabling check for arm
78 %ifnarch %arm
79 make check
80 %endif
81
82 %install
83 make install DESTDIR="%buildroot" BASE_DIR="%_docdir" DOC_MODULE="%name"
84 ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml
85
86 %remove_docs
87
88 %post -p /sbin/ldconfig
89
90 %postun -p /sbin/ldconfig
91
92 %files 
93 %manifest %{name}.manifest
94 %defattr(-, root, root)
95 %license COPYING*
96 %{_libdir}/lib*.so.*
97
98 %files tools
99 %manifest %{name}.manifest
100 %defattr(-, root, root)
101 %{_bindir}/xmllint
102 %{_bindir}/xmlcatalog
103
104 %files devel
105 %manifest %{name}.manifest
106 %defattr(-, root, root)
107 %{_bindir}/xml2-config
108 %dir %{_datadir}/aclocal
109 %{_datadir}/aclocal/libxml.m4
110 %{_includedir}/libxml
111 %{_includedir}/libxml2
112 %{_libdir}/lib*.so
113 # libxml2.la is needed for the python-libxml2 build. Deleting it breaks build of python-libxml2.
114 %{_libdir}/libxml2.la
115 %{_libdir}/*.sh
116 %{_libdir}/pkgconfig/*.pc
117 %{_libdir}/cmake/libxml2/libxml2-config.cmake
118
119 %changelog