[openlibm] Add .spec file

Milan Bouchet-Valat nalimilan at fedoraproject.org
Mon May 19 21:20:06 UTC 2014


commit 188fde0fa3230a6635ccc0ba53f60c0a5d9563e4
Author: Milan Bouchet-Valat <nalimilan at club.fr>
Date:   Mon May 19 23:19:57 2014 +0200

    Add .spec file

 openlibm.spec |  116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 116 insertions(+), 0 deletions(-)
---
diff --git a/openlibm.spec b/openlibm.spec
new file mode 100644
index 0000000..8cc461f
--- /dev/null
+++ b/openlibm.spec
@@ -0,0 +1,116 @@
+%bcond_with static_libs # don't build static libraries
+
+Summary:        High quality system independent, open source libm
+Name:           openlibm
+Version:        0.3
+Release:        6%{?dist}
+License:        BSD and MIT and ISC and Public Domain
+Group:          System Environment/Libraries
+Source0:        https://github.com/JuliaLang/openlibm/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+URL:            https://github.com/JuliaLang/openlibm/
+# openlibm does not currently build properly on non-x86 architectures
+# https://github.com/JuliaLang/openlibm/issues/18
+ExclusiveArch:  %{ix86} x86_64
+
+%description
+OpenLIBM is an effort to have a high quality standalone LIBM library.
+It is meant to be used standalone in applications and programming language
+implementations. The OpenLIBM code derives from the FreeBSD msun implementation,
+which in turn derives from FDLIBM 5.3. As a result, it has a number of fixes
+and updates that have accumulated over the years in msun, and also optimized
+assembly versions of many functions.
+
+%package devel
+Summary:    High quality system independent, open source libm
+Group:      Development/Libraries
+Requires:   %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Contains header files for developing applications that use the %{name}
+library.
+
+%package static
+Summary:    High quality system independent, open source libm
+Group:      Development/Libraries
+Requires:   %{name}-devel%{?_isa} = %{version}-%{release}
+
+%description static
+Static %{name} library.
+
+%prep
+%setup -q %{name}-%{version}
+
+# File under the Apple Public Source License Version 1.1
+rm -f deps/openlibm/test/ieeetestnew.c
+# File under the Apple Public Source License Version 2.0
+rm -f deps/openlibm/i387/osx_asm.h
+
+%build
+# openlibm uses the arch name to choose which directory to build
+# and the name is "arm"
+%ifarch arm7hl
+%global arch arm
+%else
+%global arch %{_arch}
+%endif
+
+make %{?_smp_mflags} \
+      FFLAGS="%{optflags}" \
+      CFLAGS="%{optflags}" \
+      ARCH=%{arch}
+
+# %%check
+# cd test/
+# This test sometimes currently fails due to a very small difference:
+# https://github.com/JuliaLang/openlibm/issues/53
+#./test-float
+# This test fails on i686:
+# https://github.com/JuliaLang/openlibm/issues/55
+#./test-double
+
+%install
+make install prefix=%{_prefix} \
+             libdir=%{_libdir} \
+             includedir=%{_includedir} \
+             DESTDIR=%{buildroot}
+
+%if ! %{with static_libs}
+rm %{buildroot}/%{_libdir}/libopenlibm.a
+%endif
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%doc LICENSE.md README.md
+%{_libdir}/libopenlibm.so.0*
+
+%files devel
+%{_libdir}/libopenlibm.so
+%{_includedir}/openlibm.h
+%{_includedir}/openlibm/
+
+%if %{with static_libs}
+%files static
+%{_libdir}/libopenlibm.a
+%endif
+
+%changelog
+* Sun May 4 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-6
+- Disable tests for now.
+
+* Thu May 1 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-5
+- Add tests.
+
+* Tue Apr 29 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-4
+- Add ISC to list of licenses.
+- Add bug reference about the failing tests.
+
+* Mon Apr 21 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-3
+- Use Group System Environment/Libraries for base package.
+
+* Sun Apr 20 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-2
+- Put libopenlibm.so.0 in base package instead of in -devel.
+
+* Sat Apr 19 2014 Milan Bouchet-Valat <nalimilan at club.fr> - 0.3-1
+- Initial version.


More information about the scm-commits mailing list