Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > c434a6142dee4d16cf2a9397a54739f3 > files > 2

gmp-ecm-6.3-1.fc14.src.rpm

Name:           gmp-ecm
Version:        6.3
Release:        1%{?dist}
Summary:        Elliptic Curve Method for Integer Factorization
Group:          Applications/Engineering
License:        LGPLv2+ and GPLv2+
URL:            http://gforge.inria.fr/projects/ecm/
# We have to get a new source URL every time the version changes.
# This means there's no reason to have %%{version} in it.
Source0:        http://gforge.inria.fr/frs/download.php/26838/ecm-6.3.tar.gz

BuildRequires:  docbook-style-xsl
BuildRequires:  gmp-devel
BuildRequires:  gsl-devel
BuildRequires:  libxslt
BuildRequires:  m4


%description
Programs and libraries employing elliptic curve method for factoring
integers (with GMP for arbitrary precision integers).


%package        devel
Summary:        Files useful for %{name} development
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       gmp-devel%{?_isa}


%description    devel
The libraries and header files for using %{name} for development.


%package        static
Summary:        Files used for static linking with %{name}
Group:          Development/Libraries
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}


%description    static
The static libraries for using %{name} for development.


%prep
%setup -q -n ecm-%{version}

# Fix non-UTF-8 encodings
for badfile in ChangeLog README AUTHORS ; do
  iconv -f iso-8859-1 -t utf-8 -o $badfile.UTF-8 $badfile 
  touch -r $badfile $badfile.UTF-8
  mv $badfile.UTF-8 $badfile
done

# Fix the FSF's address
for badfile in auxi.c b1_ainc.c candi.c ecm-impl.h ecm-ecm.h eval.c main.c \
    resume.c trial.c; do
  sed -e 's/Fifth Floor/Suite 500/' -e 's/02111-1307/02110-1335/' \
      -i.orig $badfile
  touch -r $badfile.orig $badfile
  rm -f $badfile.orig
done


%build
FLGS="--enable-shared --enable-openmp --enable-shellcmd --disable-assert"

# Build an SSE2-enabled version for 32-bit x86
%ifarch %ix86
%configure ${FLGS} --build=pentium4-pc-linux-gnu --host=pentium4-pc-linux-gnu \
  --disable-static --enable-sse2 --enable-asm-redc \
  CFLAGS="$RPM_OPT_FLAGS -march=pentium4 -Wa,--noexecstack" \
  LDFLAGS="-Wl,-z,noexecstack -lgmp -lgomp"
rm -f ecm-params.h
ln -s ecm-params.h.pentium4 ecm-params.h
make %{?_smp_mflags}
cp -a .libs .sse2
make clean
# Make clean doesn't clean everything....
rm -f config.h config.log config.status ecm-params.h stamp-h1
ln -s ecm-params.h.default ecm-params.h
%endif

# Build a non-SSE2 version (x86_64 loses out; the assembly code containing
# SSE2 instructions is 32-bit only).
%configure ${FLGS} --disable-sse2 CFLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack" \
  LDFLAGS="-Wl,-z,noexecstack -lgmp -lgomp"
make --eval='.SECONDARY:' %{?_smp_mflags}


%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
pushd $RPM_BUILD_ROOT%{_bindir}
  mv ecm %{name}
popd
pushd $RPM_BUILD_ROOT%{_mandir}/man1
  for file in ecm.1*; do
    mv $file ${file/ecm/%{name}}
  done
popd

%ifarch %ix86
mkdir -p $RPM_BUILD_ROOT%{_libdir}/sse2
cp -p .sse2/libecm.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/sse2
%endif


%check
make check


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%doc README COPYING COPYING.LIB AUTHORS ChangeLog NEWS TODO
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_libdir}/libecm.so.*
%ifarch %ix86
%{_libdir}/sse2/libecm.so.*
%endif


%files devel
%doc README.lib
%{_includedir}/ecm.h
%{_libdir}/libecm.so


%files static
%{_libdir}/libecm.a


%changelog
* Fri May 13 2011 Jerry James <loganjerry@gmail.com> - 6.3-1
- New upstream release
- Drop BuildRoot tag, clean script, and clean at start of install script
- Build an SSE2 version of the library for 32-bit x86
- Ensure the executable stack flag is not set on any ELF objects
- Various cleanups to fix rpmlint warnings
- Add check script

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Apr 30 2009 Conrad Meyer <konrad@tylerc.org> - 6.2.3-1
- Bump to 6.2.3.

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Nov 30 2008 Conrad Meyer <konrad@tylerc.org> - 6.2.1-4
- Convert AUTHORS to utf-8 as well.
- Really bump release this time.

* Sat Nov 29 2008 Conrad Meyer <konrad@tylerc.org> - 6.2.1-3
- Add some %%docs.
- Add ldconfig (oops).
- Install binary and manpage under gmp-ecm, not ecm.

* Fri Nov 28 2008 Conrad Meyer <konrad@tylerc.org> - 6.2.1-2
- Change name.
- Split out a -static package and build shared libs for -devel.

* Wed Nov 26 2008 Conrad Meyer <konrad@tylerc.org> - 6.2.1-1
- Initial package.