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