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