%global with_allprogs 0 Name: eclib Version: 20240408 Release: %autorelease Summary: Library for Computations on Elliptic Curves License: GPL-2.0-or-later URL: https://homepages.warwick.ac.uk/~masgaj/mwrank/ VCS: https://github.com/JohnCremona/eclib Source0: %{vcs}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: boost-devel BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: make BuildRequires: ntl-devel BuildRequires: pari-devel BuildRequires: pkgconfig(flint) %description John Cremona's programs for enumerating and computing with elliptic curves defined over the rational numbers. %package devel Summary: Development Files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: boost-devel%{?_isa} Requires: ntl-devel%{?_isa} %description devel Development libraries and headers for %{name}. %prep %autosetup %build export CPPFLAGS='-I %{_includedir}/flint' %configure \ --disable-static \ --enable-shared \ --with-flint \ --with-boost \ %if %{with_allprogs} --enable-allprogs %else --disable-allprogs %endif # 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 %install %make_install rm -f %{buildroot}%{_libdir}/*.la %if !%{with_allprogs} rm %{buildroot}%{_docdir}/%{name}/{g0n,howto,progs}.txt %endif %check make check LD_LIBRARY_PATH=%{buildroot}%{_libdir} %files %doc AUTHORS NEWS README doc/mwrank %license COPYING %if %{with_allprogs} %{_bindir}/* %else %{_bindir}/mwrank %endif %{_libdir}/libec.so.10* %{_mandir}/man1/mwrank.1* %files devel %doc doc/g0n.txt %{_includedir}/%{name} %{_libdir}/libec.so %{_libdir}/pkgconfig/eclib.pc %changelog %autochangelog