From f4dc0f3ecf220026ee999f07c8820a7b28d33ff3 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 30 Oct 2018 07:03:02 -0500 Subject: [PATCH] update scriptlets (#1644106) use %make_build %make_install if this is intended to be used in fedora (28+) only, can drop the %%ldconfig_scriptlets and info-related scriptlets altogether. --- mpfr.spec | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/mpfr.spec b/mpfr.spec index 551f215..78709bc 100644 --- a/mpfr.spec +++ b/mpfr.spec @@ -1,13 +1,11 @@ Summary: A C library for multiple-precision floating-point computations Name: mpfr Version: 3.1.6 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.mpfr.org/ # GFDL (mpfr.texi, mpfr.info and fdl.texi) License: LGPLv3+ and GPLv3+ and GFDL BuildRequires: autoconf libtool gmp-devel gcc -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig Requires: gmp >= 4.2.3 Source0: http://www.mpfr.org/%{name}-%{version}/%{name}-%{version}.tar.xz @@ -29,9 +27,13 @@ ANSI/IEEE-754 standard for double-precision floating-point arithmetic %package devel Summary: Development files for the MPFR library -Requires: %{name} = %{version}-%{release} -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info +Requires: %{name}%{?_isa} = %{version}-%{release} +# https://fedoraproject.org/wiki/Packaging:Scriptlets#Texinfo +%if 0%{?fedora} < 28 && 0%{?rhel} < 8 +%global info_scriptlet 1 +Requires(post): info +Requires(preun): info +%endif Requires: gmp-devel %description devel @@ -47,10 +49,10 @@ install the mpfr package. %build %configure --disable-assert --disable-static -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install rm -f $RPM_BUILD_ROOT%{_libdir}/libmpfr.la rm -f $RPM_BUILD_ROOT%{_infodir}/dir @@ -60,10 +62,9 @@ rm -f $RPM_BUILD_ROOT%{_pkgdocdir}/COPYING $RPM_BUILD_ROOT%{_pkgdocdir}/COPYING %check make %{?_smp_mflags} check -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets +%if 0%{?info_scriptlet} %post devel if [ -f %{_infodir}/mpfr.info.gz ]; then /sbin/install-info %{_infodir}/mpfr.info.gz %{_infodir}/dir || : @@ -75,6 +76,7 @@ if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/mpfr.info.gz %{_infodir}/dir || : fi fi +%endif %files %license COPYING COPYING.LESSER @@ -88,6 +90,10 @@ fi %{_infodir}/mpfr.info* %changelog +* Tue Oct 30 2018 Rex Dieter - 3.1.6-3 +- update scriptlets (#1644106) +- use %%make_build %%make_install + * Fri Jul 13 2018 Fedora Release Engineering - 3.1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild