## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: flintqs Version: 1.0 Release: %autorelease Summary: William Hart’s quadratic sieve License: GPLv2+ URL: https://github.com/sagemath/FlintQS Source0: %{url}/archive/v%{version}/flintqs-%{version}.tar.gz # Use of the register storage class is deprecated # https://github.com/sagemath/FlintQS/pull/2 Patch: flintqs-register.patch # Add "const" keywords to silence writable string warnings # https://github.com/sagemath/FlintQS/pull/2 Patch: flintqs-writable-string.patch # Fix mixed signed/unsigned operations # https://github.com/sagemath/FlintQS/pull/2 Patch: flintqs-signed.patch # Remove an unused variable # https://github.com/sagemath/FlintQS/pull/2 Patch: flintqs-unused.patch # Account for possibly unset TMPDIR environment variable Patch: flintqs-tmpdir.patch # Plug memory leaks # https://github.com/sagemath/FlintQS/pull/1 Patch: flintqs-memleak.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: make BuildRequires: gcc-c++ BuildRequires: gmp-devel %description This package contains William Hart’s quadratic sieve implementation, as modified for sagemath. %prep %autosetup -n FlintQS-%{version} -p1 # There is no m4 directory sed -i '/m4/d' configure.ac # Generate the configure script AUTOMAKE='automake --foreign' autoreconf --force --install --verbose . %build %configure %make_build %install %make_install %check # Example from # https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.html factors="$( echo '1000000000000000005490000000000000001989' | %{buildroot}%{_bindir}/QuadraticSieve | awk 'f; /^FACTORS:$/ {f=1}' | sort -n -u | tr '\n' ' ' )" [ "${factors}" = '10000000000000000051 100000000000000000039 ' ] %files %license COPYING %doc AUTHORS %doc NEWS %doc README %{_bindir}/QuadraticSieve %changelog * Wed Apr 20 2022 Benjamin A. Beasley 1.0-7 - Stop numbering patches * Thu Jan 20 2022 Fedora Release Engineering 1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sat Dec 11 2021 Benjamin A. Beasley 1.0-5 - Reduce macro indirection in the spec file * Fri Dec 10 2021 Benjamin A. Beasley 1.0-4 - Explicitly BR: make * Fri Dec 10 2021 Benjamin A. Beasley 1.0-3 - Style tweaks according to personal preference * Wed Aug 11 2021 Jerry James - 1.0-1 - Initial RPM