%define with_libexpat0 1 %define expat0_ver 1.95.8 Name: expat Version: 2.2.1 Release: 1mamba Summary: An XML parser written in C Group: Development/Applications Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://expat.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/expat/expat/%{version}/expat-%{version}.tar.bz2 Source1: http://downloads.sourceforge.net/sourceforge/expat/expat-%{expat0_ver}.tar.gz License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). This project aims to maintain Expat for both current and future users while improving the API to allow more reliable and robust access from "scripting" languages such as Python and Perl. %package -n libexpat Group: Development/Libraries Summary: Main library for expat %description -n libexpat This package contains the library needed to run programs dynamically linked with expat. %package -n libexpat-devel Group: Development/Libraries Summary: Development environment for the expat XML parser Requires: libexpat = %{version}-%{release} %description -n libexpat-devel Development environment for the expat XML parser. %if %{with_libexpat0} %package -n libexpat0 Group: Development/Libraries Summary: Main library for expat 1.95.x %description -n libexpat0 This package contains the library needed to run programs dynamically linked with expat 1.95.x. %endif %package -n lib32-libexpat Summary: An XML parser library written in C Group: System/Libraries %description -n lib32-libexpat Expat is an XML parser library written in C. %package -n lib32-libexpat-devel Summary: Devel package for lib32-libX11 Group: Development/Libraries Requires: lib32-libexpat = %{?epoch:%epoch:}%{version}-%{release} Requires: libexpat-devel = %{?epoch:%epoch:}%{version}-%{release} %description -n lib32-libexpat-devel Expat is an XML parser library written in C. This package contains static libraries and header files needed for development. %prep %setup -q -a1 %build %if %{with_libexpat0} cd expat-%{expat0_ver} %configure %make cd .. %endif %configure %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %if %{with_libexpat0} make -C expat-%{expat0_ver} installlib \ libdir=%{buildroot}%{_libdir} \ includedir=%{buildroot}%{_includedir} rm -fr %{buildroot}%{_includedir} rm -f %{buildroot}%{_libdir}/libexpat.{a,la,so} %endif %makeinstall #man1dir=%{buildroot}%{_mandir}/man1 %ifarch x86_64 # x86_64 lib64 support make clean CC=%{_target_platform}-gcc \ CFLAGS="%{optflags} -m32" \ CXXLAGS="%{optflags} -m32" \ ./configure --prefix=%{_prefix} --libdir=%{_prefix}/lib make make install DESTDIR=`pwd`/lib32 cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/ %endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -n libexpat -p /sbin/ldconfig %postun -n libexpat -p /sbin/ldconfig %post -n lib32-libexpat -p /sbin/ldconfig %postun -n lib32-libexpat -p /sbin/ldconfig %if %{with_libexpat0} %post -n libexpat0 -p /sbin/ldconfig %postun -n libexpat0 -p /sbin/ldconfig %endif %files %defattr(-,root,root) %{_bindir}/xmlwf %{_mandir}/man1/xmlwf.* %files -n libexpat %defattr(-,root,root) %{_libdir}/libexpat.so.* %if %{with_libexpat0} %exclude %{_libdir}/libexpat.so.0 %exclude %{_libdir}/libexpat.so.0.5.0 %endif %doc COPYING %files -n libexpat-devel %defattr(-,root,root) %{_includedir}/*.h %{_libdir}/libexpat.a %{_libdir}/libexpat.la %{_libdir}/libexpat.so %{_libdir}/pkgconfig/expat.pc %if %{with_libexpat0} %files -n libexpat0 %defattr(-,root,root) %{_libdir}/libexpat.so.0 %{_libdir}/libexpat.so.0.5.0 %endif %ifarch x86_64 %files -n lib32-libexpat %defattr(-,root,root) %{_prefix}/lib/libexpat.so.* %files -n lib32-libexpat-devel %defattr(-,root,root) %{_prefix}/lib/libexpat.a %{_prefix}/lib/libexpat.la %{_prefix}/lib/libexpat.so %{_prefix}/lib/pkgconfig/*.pc %endif %changelog * Mon Jun 26 2017 Automatic Build System 2.2.1-1mamba - automatic version update by autodist * Thu Jun 30 2016 Automatic Build System 2.2.0-1mamba - automatic version update by autodist * Thu May 19 2016 Silvan Calarco 2.1.1-1mamba - update to 2.1.1 * Fri Mar 07 2014 Silvan Calarco 2.1.0-2mamba - rebuilt to fix rpm 5.2.1-22mamba bug * Sun Dec 02 2012 Automatic Build System 2.1.0-1mamba - automatic version update by autodist * Wed Sep 26 2007 Silvan Calarco 2.0.1-1mamba - update to 2.0.1 * Mon May 07 2007 Silvan Calarco 2.0.0-3mamba - revert to expat includes in %{includedir} * Fri Apr 27 2007 Silvan Calarco 2.0.0-2mamba - includes moved to %{_includedir}/expat subdir * Mon May 22 2006 Davide Madrisan 2.0.0-1qilnx - update to version 2.0.0 by autospec - fixed package groups - added post and postun scripts for libexpat - new package libexpat0 (compatibility libraries) * Sun Oct 30 2005 Silvan Calarco 1.95.8-1qilnx - update to version 1.95.8 by autospec * Mon May 12 2003 Silvan Calarco 1.95.6-3qilnx - added lfs patch that solves an XML_Status declaration problem in expat.h * Mon May 12 2003 Silvan Calarco 1.95.6-2qilnx - added libexpat.so in devel package * Mon May 12 2003 Silvan Calarco 1.95.6-1qilnx - First build