SHA256
1
0
forked from pool/expat
expat/expat.spec

176 lines
6.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package expat
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: expat
Version: 2.0.1
Release: 105
Group: Development/Libraries/C and C++
License: MIT
Url: http://expat.sourceforge.net/
# bug437293
%ifarch ppc64
Obsoletes: expat-64bit
%endif
#
Summary: XML Parser Toolkit
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}faq.html
Source2: baselibs.conf
Patch0: %{name}-CVE-2009-2625.patch
Patch1: %{name}-CVE-2009-3560.patch
Patch2: expat-visibility.patch
Patch3: expat-alloc-size.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
%description
Expat is an XML 1.0 parser written in C. It aims to be fully
conformant. It is currently not a validating XML processor. The current
production version of expat can be downloaded from
ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
low-level library for tokenizing XML. The interface is documented in
xmltok/xmltok.h. The directory xmlparse contains an XML parser library
that is built on top of the xmltok library. The interface is documented
in xmlparse/xmlparse.h. The directory sample contains a simple example
program using this interface. The file sample/build.bat is a batch
file to build the example using Visual C++. The directory xmlwf
contains the xmlwf application, which uses the xmlparse library. The
arguments to xmlwf are one or more files to check for well-formedness.
An option -d dir can be specified. For each well-formed input file, the
corresponding canonical XML is written to dir/f, where f is the
filename (without any path) of the input file. A -x option causes
references to external general entities to be processed. A -s option
makes documents that are not stand-alone cause an error (a document is
considered stand-alone if it is intrinsically stand-alone because it
has no external subset and no references to parameter entities in the
internal subset or it is declared as stand-alone in the XML
declaration).
%package -n libexpat1
License: MIT
Summary: XML Parser Toolkit
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: expat-64bit
%endif
#
%description -n libexpat1
Expat is an XML 1.0 parser written in C. It aims to be fully
conformant. It is currently not a validating XML processor. The current
production version of expat can be downloaded from
ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
low-level library for tokenizing XML. The interface is documented in
xmltok/xmltok.h. The directory xmlparse contains an XML parser library
that is built on top of the xmltok library. The interface is documented
in xmlparse/xmlparse.h. The directory sample contains a simple example
program using this interface. The file sample/build.bat is a batch
file to build the example using Visual C++. The directory xmlwf
contains the xmlwf application, which uses the xmlparse library. The
arguments to xmlwf are one or more files to check for well-formedness.
An option -d dir can be specified. For each well-formed input file, the
corresponding canonical XML is written to dir/f, where f is the
filename (without any path) of the input file. A -x option causes
references to external general entities to be processed. A -s option
makes documents that are not stand-alone cause an error (a document is
considered stand-alone if it is intrinsically stand-alone because it
has no external subset and no references to parameter entities in the
internal subset or it is declared as stand-alone in the XML
declaration).
%package -n libexpat-devel
License: MIT
Summary: XML Parser Toolkit
Group: Development/Libraries/C and C++
Requires: libexpat1 = %{version} glibc-devel
%description -n libexpat-devel
Expat is an XML 1.0 parser written in C. It aims to be fully
conformant. It is currently not a validating XML processor. The current
production version of expat can be downloaded from
ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
low-level library for tokenizing XML. The interface is documented in
xmltok/xmltok.h. The directory xmlparse contains an XML parser library
that is built on top of the xmltok library. The interface is documented
in xmlparse/xmlparse.h. The directory sample contains a simple example
program using this interface. The file sample/build.bat is a batch
file to build the example using Visual C++. The directory xmlwf
contains the xmlwf application, which uses the xmlparse library. The
arguments to xmlwf are one or more files to check for well-formedness.
An option -d dir can be specified. For each well-formed input file, the
corresponding canonical XML is written to dir/f, where f is the
filename (without any path) of the input file. A -x option causes
references to external general entities to be processed. A -s option
makes documents that are not stand-alone cause an error (a document is
considered stand-alone if it is intrinsically stand-alone because it
has no external subset and no references to parameter entities in the
internal subset or it is declared as stand-alone in the XML
declaration).
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
cp %{S:1} .
rm -f examples/*.dsp
%build
autoreconf
%configure --disable-static --with-pic --libdir=/%{_lib}
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
rm doc/xmlwf.1
mkdir -p $RPM_BUILD_ROOT%{_libdir}
# move .so symlink to /usr
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/lib%{name}.so) %{buildroot}%{_libdir}/lib%{name}.so
%{__rm} -v %{buildroot}/%{_lib}/lib%{name}.so
# remove .la file
rm -f $RPM_BUILD_ROOT/%{_lib}/libexpat.la
nm -C -D %{buildroot}/%{_lib}/libexpat.so.1 | wc -l
%check
make check
%post -n libexpat1 -p /sbin/ldconfig
%postun -n libexpat1 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc COPYING Changes README examples expatfaq.html
%doc doc/expat.png doc/reference.html doc/style.css doc/valid-xhtml10.png
%doc %{_mandir}/man?/*
%{_bindir}/xmlwf
%files -n libexpat1
%defattr(-, root, root)
/%{_lib}/libexpat.so.*
%files -n libexpat-devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libexpat.so
%changelog