File expat.spec of Package expat

#
# spec file for package expat (Version 2.0.1)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           expat
Version:        2.0.1
Release:        88
Group:          Development/Libraries/C and C++
License:        X11/MIT
Url:            http://expat.sourceforge.net/
# bug437293
%ifarch ppc64
Obsoletes:      expat-64bit
%endif
%ifarch  ppc
Obsoletes:      expat-32bit
%endif
#
Summary:        XML Parser Toolkit
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}faq.html
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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 directory 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).



Authors:
--------
    James Clark <jjc@jclark.com>

%package -n libexpat1
License:        MOZILLA PUBLIC LICENSE (MPL/NPL)
Summary:        XML Parser Toolkit
Group:          Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes:      expat-64bit
%endif
%ifarch  ppc
Obsoletes:      expat-32bit
%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 directory 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).



Authors:
--------
    James Clark <jjc@jclark.com>

%package -n libexpat-devel
License:        MOZILLA PUBLIC LICENSE (MPL/NPL)
Summary:        XML Parser Toolkit
Group:          Development/Libraries/C and C++
Requires:       libexpat1 = %{version}

%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 directory 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).



Authors:
--------
    James Clark <jjc@jclark.com>

%prep
%setup -q
cp %{S:1} .
rm -f examples/*.dsp

%build
%configure \
    --libdir=/%{_lib}
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm doc/xmlwf.1
mkdir -p $RPM_BUILD_ROOT%{_libdir}
# move .a file to /usr
mv $RPM_BUILD_ROOT/%{_lib}/libexpat.a $RPM_BUILD_ROOT%{_libdir}/libexpat.a
# move .so symlink to /usr
rm -f $RPM_BUILD_ROOT/%{_lib}/libexpat.so
ln -sf /%{_lib}/libexpat.so.1 $RPM_BUILD_ROOT%{_libdir}/libexpat.so
# remove .la file
rm -f $RPM_BUILD_ROOT/%{_lib}/libexpat.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libexpat1
/sbin/ldconfig

%postun -n libexpat1
/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.a
%{_libdir}/libexpat.so

%changelog
* Tue Dec 09 2008 ro@suse.de
- remove ix86 from ifarch statement obsoleting 32bit package
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Sat Jul 28 2007 coolo@suse.de
- fix devel symlink
* Wed Jul 25 2007 prusnak@suse.cz
- move libraries from /usr/lib to /lib [#285472]
- replace deprecated %%run_ldconfig with /sbin/ldconfig
* Thu Jun 07 2007 prusnak@suse.cz
- update to 2.0.1:
  ( from Changes )
  * Fixed bugs #1515266, 1515600: The character data handler's calling
  of XML_StopParser() was not handled properly; if the parser was
  stopped and the handler set to NULL, the parser would segfault.
  * Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
  some character constants to be ASCII encoded.
  * Minor cleanups of the test harness.
  * Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
  * Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
  * Fixes and improvements for Windows platform:
  bugs #1409451, #1476160, 1548182, 1602769, 1717322.
  * Build fixes for various platforms:
  HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
  All Unix: #1554618 (refreshed config.sub/config.guess).
  [#1490371], #1613457: support both, DESTDIR and INSTALL_ROOT,
  without relying on GNU-Make specific features.
  [#1647805]: Patched configure.in to work better with Intel compiler.
  * Fixes to Makefile.in to have make check work correctly:
  bugs #1408143, #1535603, #1536684.
  * Added Open Watcom support: patch #1523242.
* Tue Apr 17 2007 prusnak@suse.cz
- split libexpat1 and libexpat-devel subpackages [#260214]
* Thu Oct 19 2006 dmueller@suse.de
- strip .la file
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 13 2006 ro@suse.de
- fixed file list for debuginfo package (do not pack all of libdir)
* Wed Jan 11 2006 mjancar@suse.cz
- update to 2.0.0
* Mon Jan 09 2006 mjancar@suse.cz
- update to 2.0 pre release
* Wed Nov 10 2004 ro@suse.de
- fixed filelist
* Mon Aug 09 2004 tcrhak@suse.cz
- update to 1.95.8
* Thu Feb 05 2004 kukuk@suse.de
- Build as user
* Thu Feb 05 2004 tcrhak@suse.cz
- update to version 1.95.7
* Tue Feb 18 2003 tcrhak@suse.cz
- in expat.h, declare enum XML_Status before using it;
  put into patch "...-header.diff" [bug #23742]
* Mon Feb 17 2003 tcrhak@suse.cz
- updated to version 1.95.6
* Sun Dec 22 2002 tcrhak@suse.cz
- update to version 1.95.5
* Sat Jul 13 2002 tcrhak@suse.cz
- update to version 1.95.4
* Thu Mar 28 2002 tcrhak@suse.cz
- added parameter --target to configure
* Mon Jan 14 2002 rvasice@suse.cz
- use %%{_libdir} and %%{_lib}
* Tue Nov 20 2001 rvasice@suse.cz
- fix URL in spec file
* Wed Aug 15 2001 rvasice@suse.cz
- update to version 1.95.2
- spec file cleanup
- added DESTDIR
* Mon May 14 2001 pblaha@suse.cz
- fixed links for soname of libexpat.so*
* Fri May 11 2001 cihlar@suse.cz
- fixed soname of libexpat.so.1.2
* Fri Jan 05 2001 pblaha@suse.cz
- back on stable version 1.2  added build shared libexpat.so
* Thu Jan 04 2001 pblaha@suse.cz
- update on 1.95.1 on sourgeforge needed for midgard
- new description
* Thu Mar 09 2000 ke@suse.de
- Don't "install" symlinks; use "cp"; reported by bs; proposed fix
  by ro.
- Cleanup the spec file: better Group tag; more accurate files list.
* Tue Nov 23 1999 ke@suse.de
- first SuSE package: version 1.1.
- apply Debian patch to build shared libs.
- build libexpat.a.
openSUSE Build Service is sponsored by