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