Merge "Merge branch 'tizen_base' into tizen" into tizen
[platform/upstream/libxml2.git] / packaging / libxml2.spec
1
2 %if "%{run_tests}" == "1"
3     %define __spec_check_pre %___build_pre
4         %define check %%check
5 %endif
6
7
8 Name:           libxml2
9 Version:        2.9.7
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 rm -f /tmp/%{name}_test
84 %__make runtests | tee -i /tmp/%{name}_log
85 cat /tmp/%{name}_log | grep "^TEST: " > /tmp/%{name}_test
86 chmod +x ./run_test.sh
87 ./run_test.sh %{name} %{version}
88 rm -f /tmp/%{name}_log
89
90
91 %install
92 make install DESTDIR="%buildroot" BASE_DIR="%_docdir" DOC_MODULE="%name"
93 ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml
94
95 %remove_docs
96
97 %post -p /sbin/ldconfig
98
99 %postun -p /sbin/ldconfig
100
101 %files
102 %manifest %{name}.manifest
103 %defattr(-, root, root)
104 %license Copyright
105 %{_libdir}/lib*.so.*
106
107 %files tools
108 %manifest %{name}.manifest
109 %defattr(-, root, root)
110 %license Copyright
111 %{_bindir}/xmllint
112 %{_bindir}/xmlcatalog
113
114 %files devel
115 %manifest %{name}.manifest
116 %defattr(-, root, root)
117 %license Copyright
118 %{_bindir}/xml2-config
119 %dir %{_datadir}/aclocal
120 %{_datadir}/aclocal/libxml.m4
121 %{_includedir}/libxml
122 %{_includedir}/libxml2
123 %{_libdir}/lib*.so
124 # libxml2.la is needed for the python-libxml2 build. Deleting it breaks build of python-libxml2.
125 %{_libdir}/libxml2.la
126 %{_libdir}/*.sh
127 %{_libdir}/pkgconfig/*.pc
128 %{_libdir}/cmake/libxml2/libxml2-config.cmake
129
130 %changelog