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