From 7a09bc4dbda18bf90f2d8109541df040fc730258 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Feb 26 2018 13:15:22 +0000 Subject: Modernization --- diff --git a/libmpc.spec b/libmpc.spec index d654efa..d01583c 100644 --- a/libmpc.spec +++ b/libmpc.spec @@ -7,10 +7,10 @@ Name: libmpc Version: 1.1.0 Release: 1%{?dist} License: LGPLv3+ and GFDL -Group: Development/Tools URL: http://www.multiprecision.org/ Source0: https://ftp.gnu.org/gnu/mpc/mpc-%{version}.tar.gz +BuildRequires: gcc BuildRequires: gmp-devel >= 5.0.0 BuildRequires: mpfr-devel >= 3.0.0 BuildRequires: texinfo @@ -20,7 +20,6 @@ Source1: http://www.multiprecision.org/downloads/mpc-%{bootstrap_version}.tar.gz %endif %description - MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr. @@ -32,10 +31,10 @@ built upon and follows the same principles as Mpfr. %setup -q -n mpc-%{version} %endif +%build %configure --disable-static make %{?_smp_mflags} -%build export CPPFLAGS="%{optflags} -std=gnu99" export CFLAGS="%{optflags} -std=gnu99" export EGREP=egrep @@ -43,7 +42,7 @@ export EGREP=egrep %if 0%{?bootstrap} pushd mpc-%{bootstrap_version} %configure --disable-static -make %{?_smp_mflags} +%make_build popd %endif @@ -52,7 +51,7 @@ make check %install %if 0%{?bootstrap} -make install DESTDIR=$RPM_BUILD_ROOT -C mpc-%{bootstrap_version} +%make_install -C mpc-%{bootstrap_version} ## remove everything but shlib rm -fv $RPM_BUILD_ROOT%{_libdir}/libmpc.so @@ -60,12 +59,11 @@ rm -fv $RPM_BUILD_ROOT%{_includedir}/* rm -fv $RPM_BUILD_ROOT%{_infodir}/* %endif -make install DESTDIR=$RPM_BUILD_ROOT +%make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/libmpc.la rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license COPYING.LESSER @@ -105,15 +103,19 @@ Summary: compat/bootstrap mpc-%{bootstrap_version} library %description -n compat-libmpc Contains the .so files for mpc version %{bootstrap-version}. -%post -n compat-libmpc -p /sbin/ldconfig -%postun -n compat-libmpc -p /sbin/ldconfig +%ldconfig_scriptlets -n compat-libmpc %files -n compat-libmpc %{_libdir}/libmpc.so.2* %endif %changelog -* Sun Jan 21 2018 James Paul Turner - 1.1.0-1 +* Mon Feb 26 2018 Zbigniew Jędrzejewski-Szmek - 1.1.0-1 +- Modernization of the spec file (remove Group, use new make and ldconfig macros, + add gcc to BuildRequires) +- Move build to %%build + +* Mon Feb 26 2018 James Paul Turner - 1.1.0-1 - Upgrade to libmpc version 1.1.0 - Fix broken compat package build