Make mpfr3 and mpfr3-devel subpackages.
Also: - Drop the compat-libmpc package; nothing in Fedora needs it - Update project URL - Add a -doc subpackage to hold the GFDL-licensed content - Drop unnecessary texinfo BR - Drop ldconfig_scriptlets; this version cannot appear in distros that need it - Make sure there are no rpaths and that -Wl,--as-needed takes effect
This commit is contained in:
parent
5448a0540d
commit
d469b80cdf
8
libmpc.rpmlintrc
Normal file
8
libmpc.rpmlintrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
|
||||||
|
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
|
||||||
|
|
||||||
|
# The dictionary lacks some technical words
|
||||||
|
addFilter(r'spelling-error .* symlinks')
|
||||||
|
|
||||||
|
# Documentation is in the -doc subpackage
|
||||||
|
addFilter(r'^libmpc.*-devel\.[^:]+: W: no-documentation')
|
225
libmpc.spec
225
libmpc.spec
@ -1,22 +1,26 @@
|
|||||||
# build compat-libmpc for bootstrapping purposes
|
# build compat-libmpc for bootstrapping purposes
|
||||||
%define bootstrap 1
|
%global bootstrap 0
|
||||||
%define bootstrap_version 0.9
|
%global bootstrap_version 0.9
|
||||||
|
|
||||||
Summary: C library for multiple precision complex arithmetic
|
Summary: C library for multiple precision complex arithmetic
|
||||||
Name: libmpc
|
Name: libmpc
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: LGPLv3+ and GFDL
|
License: LGPLv3+
|
||||||
URL: http://www.multiprecision.org/
|
URL: http://www.multiprecision.org/mpc/
|
||||||
Source0: https://ftp.gnu.org/gnu/mpc/mpc-%{version}.tar.gz
|
Source0: https://ftp.gnu.org/gnu/mpc/mpc-%{version}.tar.gz
|
||||||
|
%if 0%{?bootstrap}
|
||||||
|
Source1: https://ftp.gnu.org/gnu/mpc/mpc-%{bootstrap_version}.tar.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gmp-devel >= 5.0.0
|
BuildRequires: gmp-devel >= 5.0.0
|
||||||
BuildRequires: mpfr-devel >= 3.0.0
|
BuildRequires: mpfr-devel
|
||||||
BuildRequires: texinfo
|
BuildRequires: mpfr3-devel
|
||||||
|
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap} == 0
|
||||||
Source1: http://www.multiprecision.org/downloads/mpc-%{bootstrap_version}.tar.gz
|
Obsoletes: compat-libmpc < %{version}-1
|
||||||
|
Provides: compat-libmpc = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -24,64 +28,45 @@ MPC is a C library for the arithmetic of complex numbers with
|
|||||||
arbitrarily high precision and correct rounding of the result. It is
|
arbitrarily high precision and correct rounding of the result. It is
|
||||||
built upon and follows the same principles as Mpfr.
|
built upon and follows the same principles as Mpfr.
|
||||||
|
|
||||||
%prep
|
|
||||||
%if 0%{?bootstrap}
|
|
||||||
%setup -q -n mpc-%{version} -a 1
|
|
||||||
%else
|
|
||||||
%setup -q -n mpc-%{version}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
|
||||||
%configure --disable-static
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
export CPPFLAGS="%{optflags} -std=gnu99"
|
|
||||||
export CFLAGS="%{optflags} -std=gnu99"
|
|
||||||
export EGREP=egrep
|
|
||||||
|
|
||||||
%if 0%{?bootstrap}
|
|
||||||
pushd mpc-%{bootstrap_version}
|
|
||||||
%configure --disable-static
|
|
||||||
%make_build
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
|
||||||
make check
|
|
||||||
|
|
||||||
%install
|
|
||||||
%if 0%{?bootstrap}
|
|
||||||
%make_install -C mpc-%{bootstrap_version}
|
|
||||||
|
|
||||||
## remove everything but shlib
|
|
||||||
rm -fv $RPM_BUILD_ROOT%{_libdir}/libmpc.so
|
|
||||||
rm -fv $RPM_BUILD_ROOT%{_includedir}/*
|
|
||||||
rm -fv $RPM_BUILD_ROOT%{_infodir}/*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%make_install
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libmpc.la
|
|
||||||
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license COPYING.LESSER
|
|
||||||
%doc README NEWS
|
|
||||||
%{_libdir}/libmpc.so.3*
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header and shared development libraries for MPC
|
Summary: Headers and shared development libraries for MPC
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: mpfr-devel gmp-devel
|
Requires: gmp-devel%{?_isa}
|
||||||
|
Requires: mpfr-devel%{?_isa}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header files and shared object symlinks for MPC is a C library.
|
Header files and shared library symlinks for the MPC library.
|
||||||
|
|
||||||
%files devel
|
%package doc
|
||||||
%{_libdir}/libmpc.so
|
Summary: Documentation for the MPC library
|
||||||
%{_includedir}/mpc.h
|
License: GFDL
|
||||||
%{_infodir}/*.info*
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for the MPC library.
|
||||||
|
|
||||||
|
%package mpfr3
|
||||||
|
Summary: C library for multiple-precision complex arithmetic (MPFR 3)
|
||||||
|
|
||||||
|
%description mpfr3
|
||||||
|
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.
|
||||||
|
|
||||||
|
This is the same as the libmpc package, except this package is linked
|
||||||
|
with MPFR 3. The libmpc package is linked with MPFR 4.
|
||||||
|
|
||||||
|
%package mpfr3-devel
|
||||||
|
Summary: Headers and shared development libraries for MPC (MPFR 3)
|
||||||
|
Requires: %{name}-mpfr3%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: gmp-devel%{?_isa}
|
||||||
|
Requires: mpfr3-devel%{?_isa}
|
||||||
|
|
||||||
|
%description mpfr3-devel
|
||||||
|
Header files and shared library symlinks for the MPC library.
|
||||||
|
|
||||||
|
This is the same as the libmpc-devel package, except this package is for
|
||||||
|
use with MPFR 3. The libmpc-devel package is for use with MPFR 4.
|
||||||
|
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
%package -n compat-libmpc
|
%package -n compat-libmpc
|
||||||
@ -89,14 +74,128 @@ Summary: compat/bootstrap mpc-%{bootstrap_version} library
|
|||||||
|
|
||||||
%description -n compat-libmpc
|
%description -n compat-libmpc
|
||||||
Contains the .so files for mpc version %{bootstrap-version}.
|
Contains the .so files for mpc version %{bootstrap-version}.
|
||||||
|
%endif
|
||||||
|
|
||||||
%ldconfig_scriptlets -n compat-libmpc
|
%prep
|
||||||
|
%if 0%{?bootstrap}
|
||||||
|
%setup -q -n mpc-%{version} -a 1
|
||||||
|
%else
|
||||||
|
%setup -q -n mpc-%{version}
|
||||||
|
%setup -q -T -D -a 0 -n mpc-%{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Prepare the mpfr3 build so it does not collide with the main package
|
||||||
|
mv mpc-%{version} mpc-%{version}-mpfr3
|
||||||
|
cd mpc-%{version}-mpfr3
|
||||||
|
sed -i 's/-lmpfr/&3/g;s/mpfr\.h/mpfr3.h/g' configure src/mpc{,-impl}.h
|
||||||
|
sed -e 's/libmpc_la/libmpc_mpfr3_la/g' \
|
||||||
|
-e 's/libmpc\.la/libmpc-mpfr3.la/'g \
|
||||||
|
-i {src,tests}/Makefile.in
|
||||||
|
cd -
|
||||||
|
|
||||||
|
# For the bootstrap build, link both packages with mpfr3
|
||||||
|
sed -i 's/-lmpfr/&3/g;s/mpfr\.h/mpfr3.h/g' configure src/mpc{,-impl}.h
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --disable-static
|
||||||
|
|
||||||
|
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
|
||||||
|
# -Wl,--as-needed after all the libraries.
|
||||||
|
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
||||||
|
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
||||||
|
-e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
|
||||||
|
-i libtool
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%if 0%{?bootstrap}
|
||||||
|
export CPPFLAGS="%{optflags} -std=gnu99"
|
||||||
|
export CFLAGS="%{optflags} -std=gnu99"
|
||||||
|
export EGREP=egrep
|
||||||
|
|
||||||
|
pushd mpc-%{bootstrap_version}
|
||||||
|
%configure --disable-static
|
||||||
|
%make_build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
cd mpc-%{version}-mpfr3
|
||||||
|
%configure --disable-static
|
||||||
|
|
||||||
|
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
|
||||||
|
# -Wl,--as-needed after all the libraries.
|
||||||
|
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
||||||
|
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
||||||
|
-e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
|
||||||
|
-i libtool
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
cd -
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if 0%{?bootstrap}
|
||||||
|
%make_install -C mpc-%{bootstrap_version}
|
||||||
|
|
||||||
|
## remove everything but shlib
|
||||||
|
rm -fv %{buildroot}%{_libdir}/libmpc.so
|
||||||
|
rm -fv %{buildroot}%{_includedir}/*
|
||||||
|
rm -fv %{buildroot}%{_infodir}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
cd mpc-%{version}-mpfr3
|
||||||
|
%make_install
|
||||||
|
rm -fr %{buildroot}/%{_infodir}
|
||||||
|
mv %{buildroot}%{_includedir}/mpc.h %{buildroot}%{_includedir}/mpc-mpfr3.h
|
||||||
|
cd -
|
||||||
|
|
||||||
|
%make_install
|
||||||
|
rm -f %{buildroot}/%{_libdir}/*.la
|
||||||
|
rm -f %{buildroot}/%{_infodir}/dir
|
||||||
|
|
||||||
|
%check
|
||||||
|
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||||
|
make check
|
||||||
|
cd mpc-%{version}-mpfr3
|
||||||
|
make check
|
||||||
|
cd -
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING.LESSER
|
||||||
|
%doc README NEWS
|
||||||
|
%{_libdir}/libmpc.so.3*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_libdir}/libmpc.so
|
||||||
|
%{_includedir}/mpc.h
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc AUTHORS
|
||||||
|
%{_infodir}/*.info*
|
||||||
|
|
||||||
|
%files mpfr3
|
||||||
|
%license mpc-%{version}-mpfr3/COPYING.LESSER
|
||||||
|
%doc mpc-%{version}-mpfr3/NEWS mpc-%{version}-mpfr3/README
|
||||||
|
%{_libdir}/libmpc-mpfr3.so.3*
|
||||||
|
|
||||||
|
%files mpfr3-devel
|
||||||
|
%{_libdir}/libmpc-mpfr3.so
|
||||||
|
%{_includedir}/mpc-mpfr3.h
|
||||||
|
|
||||||
|
%if 0%{?bootstrap}
|
||||||
%files -n compat-libmpc
|
%files -n compat-libmpc
|
||||||
%{_libdir}/libmpc.so.2*
|
%{_libdir}/libmpc.so.2*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 8 2019 Jerry James <loganjerry@gmail.com> - 1.1.0-5
|
||||||
|
- Make mpfr3 and mpfr3-devel subpackages
|
||||||
|
- Drop the compat-libmpc package; nothing in Fedora needs it
|
||||||
|
- Update project URL
|
||||||
|
- Add a -doc subpackage to hold the GFDL-licensed content
|
||||||
|
- Drop unnecessary texinfo BR
|
||||||
|
- Drop ldconfig_scriptlets; this version cannot appear in distros that need it
|
||||||
|
- Make sure there are no rpaths and that -Wl,--as-needed takes effect
|
||||||
|
|
||||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
1
sources
1
sources
@ -1,2 +1 @@
|
|||||||
SHA512 (mpc-0.9.tar.gz) = 84daf8e6f63c876ba4c58bd1f25aea2766dd42d6e020aa02e93682e7a1d03da6c30d02c09ac006a507feedb46ea18de415e2affa1cdb71d37d63f3130bb7dfc4
|
|
||||||
SHA512 (mpc-1.1.0.tar.gz) = 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628
|
SHA512 (mpc-1.1.0.tar.gz) = 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628
|
||||||
|
Loading…
Reference in New Issue
Block a user