# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Only strip debug info %global _find_debuginfo_opts -g # Version %define ver_major 6 %define ver_minor 2 %define ver_patch 1 %define ver_release 2 Summary : gmp compiled for vespa Name : vespa-gmp Version : %{ver_major}.%{ver_minor}.%{ver_patch} Release : %{ver_release}%{?dist} Group : Development/Tools License : LGPLv3+ or GPLv2+ URL : http://gmplib.org/ Source0 : ftp://ftp.gmplib.org/pub/gmp-%{version}/gmp-%{version}.tar.bz2 %if 0%{?el7} %define _devtoolset_enable /opt/rh/devtoolset-9/enable BuildRequires: devtoolset-9-gcc %endif %if 0%{?el8} %define _devtoolset_enable /opt/rh/gcc-toolset-9/enable BuildRequires: gcc-toolset-9-gcc %endif %if 0%{?fedora} BuildRequires: gcc %endif BuildRequires: make BuildRequires: m4 %description gmp compiled for vespa development The gmp package contains GNU MP, a library for arbitrary precision arithmetic, signed integers operations, rational numbers and floating point numbers. GNU MP is designed for speed, for both small and very large operands. GNU MP is fast because it uses fullwords as the basic arithmetic type, it uses fast algorithms, it carefully optimizes assembly code for many CPUs' most common inner loops, and it generally emphasizes speed over simplicity/elegance in its operations. %prep %setup -n gmp-%{version} %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif mkdir -p build-tmp cd build-tmp export LD_RUN_PATH=%{_libdir} CFLAGS='-g -O2' ../configure --enable-static=no --prefix=%{_prefix} --libdir=%{_libdir} make %{?_smp_mflags} %install %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif cd build-tmp export LD_RUN_PATH=%{_libdir} make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir %files %license COPYING %doc NEWS README %{_libdir} %{_includedir} %{_infodir} %changelog