2023-11-28 18:17:11 +11:00

77 lines
1.4 KiB
INI

#
# The GNU Multiple Precision Arithmetic Library (GMP)
#
# This configuration file configure's, make's and install's GMP.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: gmp-%{gmp_version}-%{_host}-%{release}
Summary: The GNU Multiple Precision Arithmetic Library (GMP) v%{gmp_version} for target %{_target} on host %{_host}
Version: %{gmp_version}
Release: %{release}
URL: https://gmplib.org/
#
# Allow the user to override the UURL
#
%if %{!defined gmp_url}
%define gmp_url https://gmplib.org/download/gmp
%endif
#
# Source
#
%source set gmp %{gmp_url}/gmp-%{gmp_version}.tar.bz2
#
# Allow extra options
#
%if %{!defined gmp_extra_options}
%define gmp_extra_options %{nil}
%endif
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
%source setup gmp -q -n gmp-%{gmp_version}
%patch setup gmp -p1
cd ${build_top}
%build
build_top=$(pwd)
cd gmp-%{gmp_version}
%{host_build_flags}
./configure \
--build=%{_build} --host=%{_host} \
--verbose \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir} \
--disable-shared \
%{gmp_extra_options}
%{__make} %{?_smp_mflags} all
cd ${build_top}
%install
build_top=$(pwd)
rm -rf $SB_BUILD_ROOT
cd gmp-%{gmp_version}
%{__make} DESTDIR=$SB_BUILD_ROOT install
cd ${build_top}