4f0b226db08b70bfd3dff2c460918f2516d06057
[platform/upstream/expat.git] / packaging / expat.spec
1 Name:           expat
2 Version:        2.1.0
3 Release:        0
4 Url:            http://expat.sourceforge.net/
5 Summary:        XML Parser Toolkit
6 License:        MIT
7 Group:          Development/Libraries/C and C++
8 Source0:        %{name}-%{version}.tar.bz2
9 Source1:        baselibs.conf
10 Patch2:         expat-visibility.patch
11 Patch3:         expat-alloc-size.patch
12 BuildRequires:  gcc-c++
13 BuildRequires:  libtool
14 BuildRequires:  pkg-config
15
16 %description
17 Expat is an XML 1.0 parser written in C. It aims to be fully
18 conformant. It is currently not a validating XML processor. The current
19 production version of expat can be downloaded from
20 ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
21 low-level library for tokenizing XML. The interface is documented in
22 xmltok/xmltok.h. The directory xmlparse contains an XML parser library
23 that is built on top of the xmltok library. The interface is documented
24 in xmlparse/xmlparse.h. The directory sample contains a simple example
25 program using this interface. The file sample/build.bat is a batch
26 file to build the example using Visual C++. The directory xmlwf
27 contains the xmlwf application, which uses the xmlparse library. The
28 arguments to xmlwf are one or more files to check for well-formedness.
29 An option -d dir can be specified. For each well-formed input file, the
30 corresponding canonical XML is written to dir/f, where f is the
31 filename (without any path) of the input file. A -x option causes
32 references to external general entities to be processed. A -s option
33 makes documents that are not stand-alone cause an error (a document is
34 considered stand-alone if it is intrinsically stand-alone because it
35 has no external subset and no references to parameter entities in the
36 internal subset or it is declared as stand-alone in the XML
37 declaration).
38
39 %package -n libexpat
40 Summary:        XML Parser Toolkit
41 Group:          Development/Libraries/C and C++
42
43 %description -n libexpat
44 Expat is an XML 1.0 parser written in C. It aims to be fully
45 conformant. It is currently not a validating XML processor. The current
46 production version of expat can be downloaded from
47 ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
48 low-level library for tokenizing XML. The interface is documented in
49 xmltok/xmltok.h. The directory xmlparse contains an XML parser library
50 that is built on top of the xmltok library. The interface is documented
51 in xmlparse/xmlparse.h. The directory sample contains a simple example
52 program using this interface. The file sample/build.bat is a batch
53 file to build the example using Visual C++. The directory xmlwf
54 contains the xmlwf application, which uses the xmlparse library. The
55 arguments to xmlwf are one or more files to check for well-formedness.
56 An option -d dir can be specified. For each well-formed input file, the
57 corresponding canonical XML is written to dir/f, where f is the
58 filename (without any path) of the input file. A -x option causes
59 references to external general entities to be processed. A -s option
60 makes documents that are not stand-alone cause an error (a document is
61 considered stand-alone if it is intrinsically stand-alone because it
62 has no external subset and no references to parameter entities in the
63 internal subset or it is declared as stand-alone in the XML
64 declaration).
65
66 %package -n libexpat-devel
67 Summary:        XML Parser Toolkit
68 Group:          Development/Libraries/C and C++
69 Requires:       glibc-devel
70 Requires:       libexpat = %{version}
71 Provides:       expat-devel
72
73 %description -n libexpat-devel
74 Expat is an XML 1.0 parser written in C. It aims to be fully
75 conformant. It is currently not a validating XML processor. The current
76 production version of expat can be downloaded from
77 ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
78 low-level library for tokenizing XML. The interface is documented in
79 xmltok/xmltok.h. The directory xmlparse contains an XML parser library
80 that is built on top of the xmltok library. The interface is documented
81 in xmlparse/xmlparse.h. The directory sample contains a simple example
82 program using this interface. The file sample/build.bat is a batch
83 file to build the example using Visual C++. The directory xmlwf
84 contains the xmlwf application, which uses the xmlparse library. The
85 arguments to xmlwf are one or more files to check for well-formedness.
86 An option -d dir can be specified. For each well-formed input file, the
87 corresponding canonical XML is written to dir/f, where f is the
88 filename (without any path) of the input file. A -x option causes
89 references to external general entities to be processed. A -s option
90 makes documents that are not stand-alone cause an error (a document is
91 considered stand-alone if it is intrinsically stand-alone because it
92 has no external subset and no references to parameter entities in the
93 internal subset or it is declared as stand-alone in the XML
94 declaration).
95
96 %prep
97 %setup -q 
98 %patch2 -p1
99 %patch3
100 rm -f examples/*.dsp
101
102 %build
103 autoreconf -fi
104 %configure --disable-static --with-pic
105 make %{?_smp_mflags}
106
107 %check
108 make check
109
110 %install
111 %make_install
112 rm doc/xmlwf.1
113
114 %post -n libexpat -p /sbin/ldconfig
115
116 %postun -n libexpat -p /sbin/ldconfig
117
118 %files
119 %defattr(-, root, root)
120 %doc COPYING 
121 %doc %{_mandir}/man?/*
122 %{_bindir}/xmlwf
123
124 %files -n libexpat
125 %defattr(-, root, root)
126 %{_libdir}/libexpat.so.*
127
128 %files -n libexpat-devel
129 %defattr(-, root, root)
130 %{_includedir}/*
131 %{_libdir}/libexpat.so
132 %{_libdir}/pkgconfig/expat.pc
133
134 %changelog