9 Commits

View File

@ -1,22 +1,18 @@
%define with_libexpat0 1
%define expat0_ver 1.95.8
Name: expat Name: expat
Version: 2.2.1 Version: 2.4.3
Release: 1mamba Release: 1mamba
Summary: An XML parser written in C Summary: An XML parser written in C
Group: Development/Applications Group: Development/Applications
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://expat.sourceforge.net/ URL: https://sourceforge.net/projects/expat/
Source0: http://downloads.sourceforge.net/project/expat/expat/%{version}/expat-%{version}.tar.bz2 Source0: https://sourceforge.net/projects/expat/files/expat/%{version}/expat-%{version}.tar.xz
Source1: http://downloads.sourceforge.net/sourceforge/expat/expat-%{expat0_ver}.tar.gz
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description %description
Expat is an XML parser library written in C. Expat is an XML parser library written in C.
@ -33,88 +29,31 @@ This package contains the library needed to run programs dynamically linked with
%package -n libexpat-devel %package -n libexpat-devel
Group: Development/Libraries Group: Development/Libraries
Summary: Development environment for the expat XML parser Summary: Development environment for the expat XML parser
Requires: libexpat = %{version}-%{release} Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n libexpat-devel %description -n libexpat-devel
Development environment for the expat XML parser. Development environment for the expat XML parser.
%if %{with_libexpat0} %debug_package
%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 %prep
%setup -q -a1 %setup -q
%build %build
%if %{with_libexpat0} %configure \
cd expat-%{expat0_ver} DOCBOOK_TO_MAN="xmlto man --skip-validation"
%configure
%make
cd ..
%endif
%configure
%make %make
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{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 %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 %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n libexpat -p /sbin/ldconfig %post -n libexpat -p /sbin/ldconfig
%postun -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 %files
%defattr(-,root,root) %defattr(-,root,root)
@ -124,10 +63,6 @@ cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/
%files -n libexpat %files -n libexpat
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libexpat.so.* %{_libdir}/libexpat.so.*
%if %{with_libexpat0}
%exclude %{_libdir}/libexpat.so.0
%exclude %{_libdir}/libexpat.so.0.5.0
%endif
%doc COPYING %doc COPYING
%files -n libexpat-devel %files -n libexpat-devel
@ -137,28 +72,42 @@ cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/
%{_libdir}/libexpat.la %{_libdir}/libexpat.la
%{_libdir}/libexpat.so %{_libdir}/libexpat.so
%{_libdir}/pkgconfig/expat.pc %{_libdir}/pkgconfig/expat.pc
%dir %{_libdir}/cmake/expat-%{version}
%if %{with_libexpat0} %{_libdir}/cmake/expat-%{version}/expat*.cmake
%files -n libexpat0 %dir %{_datadir}/doc/expat
%defattr(-,root,root) %{_datadir}/doc/expat/*
%{_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 %changelog
* Sun Jan 16 2022 Automatic Build System <autodist@mambasoft.it> 2.4.3-1mamba
- automatic version update by autodist
* Mon Dec 20 2021 Automatic Build System <autodist@mambasoft.it> 2.4.2-1mamba
- automatic version update by autodist
* Mon May 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-1mamba
- update to 2.4.1
* Sat Mar 27 2021 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba
- automatic version update by autodist
* Wed Oct 21 2020 Automatic Build System <autodist@mambasoft.it> 2.2.10-1mamba
- automatic version update by autodist
* Wed Oct 16 2019 Automatic Build System <autodist@mambasoft.it> 2.2.9-1mamba
- automatic version update by autodist
* Thu Aug 01 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.7-2mamba
- removed internal legacy package libexpat0
* Wed Jul 31 2019 Automatic Build System <autodist@mambasoft.it> 2.2.7-1mamba
- automatic version update by autodist
* Mon Aug 14 2017 Automatic Build System <autodist@mambasoft.it> 2.2.3-1mamba
- automatic version update by autodist
* Fri Jul 21 2017 Automatic Build System <autodist@mambasoft.it> 2.2.2-1mamba
- automatic version update by autodist
* Mon Jun 26 2017 Automatic Build System <autodist@mambasoft.it> 2.2.1-1mamba * Mon Jun 26 2017 Automatic Build System <autodist@mambasoft.it> 2.2.1-1mamba
- automatic version update by autodist - automatic version update by autodist