Name: libdfp
Version: 1.0.9
Release: 1%{?dist}
Summary: Decimal Floating Point C Library
Group: System Environment/Libraries
License: LGPLv2.1
Url: svn://svn.eglibc.org/libdfp/trunk
Source0: %{name}-%{version}-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# See bug 464229
#ExclusiveArch: ppc ppc64 s390 s390x %{ix86} x86_64
ExclusiveArch: ppc ppc64 ppc64le s390 s390x
%description
Decimal Floating Point C Library
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%ifarch ppc ppc64 s390 s390x
BuildRequires: prelink
%endif
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep -n %{name}-%{version}-1
%setup -q -n %{name}-%{version}-1
%define subdir_configure \
cat >configure <<'EOF'\
#!/bin/sh\
exec ../${0##*/} "$@"\
EOF\
chmod +x configure \
%configure
%ifarch ppc ppc64
%define cpu_variants power6
%endif
%ifarch s390 s390x
%define cpu_variants z9-ec
%endif
%build
mkdir Build
cd Build
%subdir_configure --disable-static
make %{?_smp_mflags}
cd ..
%if 0%{?cpu_variants:1}
for cpu in %{cpu_variants}; do
mkdir Build-$cpu
cd Build-$cpu
%subdir_configure --disable-static --with-cpu=$cpu
make %{?_smp_mflags}
cd ..
done
%endif
%install
cd Build
rm -rf $RPM_BUILD_ROOT
make install install_root=$RPM_BUILD_ROOT
cd ..
%if 0%{?cpu_variants:1}
for cpu in %{cpu_variants}; do
cd Build-$cpu
mkdir -p $RPM_BUILD_ROOT%_libdir/$cpu
install -m 755 libdfp-%{version}.so $RPM_BUILD_ROOT%_libdir/$cpu
ldconfig -l $RPM_BUILD_ROOT%_libdir/$cpu/libdfp-%{version}.so
# No prelink for ppc64le yet
%ifarch ppc ppc64 s390 s390x
execstack -c $RPM_BUILD_ROOT%_libdir/$cpu/libdfp-%{version}.so
%endif
if test $cpu = power6; then
mkdir -p $RPM_BUILD_ROOT%_libdir/${cpu}x
pushd $RPM_BUILD_ROOT%_libdir/${cpu}x
ln -sf ../$cpu/*.so .
cp -a ../$cpu/*.so.* .
popd
fi
cd ..
done
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_libdir}/*-*.so
%if 0%{?cpu_variants:1}
%(for cpu in %{cpu_variants}; do echo %dir %{_libdir}/$cpu; test $cpu = power6 && echo %dir %{_libdir}/${cpu}x; done)
%{_libdir}/*/*.so.*
%{_libdir}/*/*-*.so
%endif
%{_prefix}/share/doc/dfp/README
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%exclude %{_libdir}/*-*.so
%changelog
* Wed Feb 19 2014 Jeff Law <schwab@redhat.com> - 1.0.9-1
- Rebase to libdfp-1.0.9-1 to bring in ppc64le support.
Requires disabling execstack for ppc64le due to lack of
availability
* Wed Feb 19 2014 Jeff Law <law@redhat.com> - 1.0.8-5
- Clear executable stack on the cpu_variants builds since
they may contain objects built from assembly which do not
contain the magic tags. BuildRequires: prelink (#804765)
* Mon Feb 3 2014 Daniel Mach <dmach@redhat.com> - 1.0.8-4
- Mass rebuild 2014-01-24
* Fri Oct 26 2012 Jeff Law <law@redhat.com> - 1.0.8-3
- Bump release in the hopes it'll make package wrangler
import the new bits and do the right thing.
* Fri Sep 7 2012 Jeff Law <law@redhat.com> - 1.0.8-2
- Add URL tag to spec file.
* Mon Jun 11 2012 Jeff Law <law@redhat.com> - 1.0.8-1
- resync with upstream sources r17008 (#804765)
* Wed May 12 2010 Andreas Schwab <schwab@redhat.com> - 1.0.1-2
- Enable building on s390/s390x (#464229)
* Wed Jan 27 2010 Andreas Schwab <schwab@redhat.com> - 1.0.1-1
- Initial version 1.0.1