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