9b91874
Name:           eclib
66a6570
Version:        20100711
a35ea0e
Release:        3%{?dist}
66a6570
Summary:        Library for Computations on Elliptic Curves
66a6570
Group:          Development/Libraries
9b91874
License:        GPLv2+
9b91874
URL:            http://www.warwick.ac.uk/~masgaj/
66a6570
Source0:        http://sagemath.org/packages/standard/eclib-%{version}.spkg
66a6570
# This patch fixes some compiler warnings that indicate possibly incorrect
66a6570
# runtime behavior.
66a6570
Patch0:         eclib-warning.patch
66a6570
9b91874
BuildRequires:  ntl-devel
9b91874
BuildRequires:  pari-devel
9b91874
9b91874
9b91874
%description
9b91874
John Cremona's programs for enumerating and computating with elliptic
9b91874
curves defined over the rational numbers.
9b91874
9b91874
9b91874
%package        devel
9b91874
Summary:        Development Files for %{name}
9b91874
Group:          Development/Libraries
ded8f01
Requires:       %{name}%{?_isa} = %{version}-%{release}
ded8f01
Requires:       ntl-devel%{?_isa}
9b91874
9b91874
9b91874
%description    devel
9b91874
Development libraries and headers for %{name}.
9b91874
9b91874
9b91874
%prep
66a6570
%setup -q
66a6570
%patch0
66a6570
66a6570
# Add an soname, and don't link both the static archive and all of its
66a6570
# constituent object files into the shared library.
66a6570
sed -e "s|\$(SO_OPTS)  \$(A_LIBNAME)|\$(SO_OPTS)|" \
66a6570
    -e "s|\$(LIBFLAGS)|\$(LIBFLAGS) -Wl,-soname,\$(SO_LIBNAME).%{version}|" \
66a6570
    -i src/Makefile.dynamic
66a6570
66a6570
# Use RPM_OPT_FLAGS
66a6570
sed -i "s|-g -O2|${RPM_OPT_FLAGS}|" src/Makefile
66a6570
66a6570
# Eliminate unused direct shared library dependencies
66a6570
sed -i -e "s/ -lgmp//" src/procs/Makefile
66a6570
sed -i -e "s/ -lpari//g" -e "s/ -lgmp//" \
66a6570
  src/g0n/Makefile src/qcurves/Makefile src/qrank/Makefile
66a6570
66a6570
# Fix the FSF's address
66a6570
for f in `find . -name \*.h -o -name \*.cc`; do
66a6570
  sed -i.orig \
66a6570
    -e 's/59 Temple Place, Suite 330, Boston, MA 02111-1307/51 Franklin Street, Suite 500, Boston, MA 02110-1335/' \
66a6570
    -e 's/59 Temple Place - Suite 330, Boston, MA 02111-1307/51 Franklin Street, Suite 500, Boston, MA 02110-1335/' \
66a6570
    $f
66a6570
  touch -r $f.orig $f
66a6570
  rm -f $f.orig
66a6570
done
66a6570
66a6570
# Prepare the -devel documentation
66a6570
cp -p src/procs/ChangeLog ChangeLog.procs
66a6570
cp -p src/qcurves/ChangeLog ChangeLog.qcurves
66a6570
cp -p src/qrank/ChangeLog ChangeLog.qrank
9b91874
9b91874
9b91874
%build
66a6570
# Parallel make breaks this build (so no %%{?_smp_mflags} for us).
66a6570
make -C src all so PICFLAG=-fPIC SO_OPTS="-fPIC -shared"
9b91874
9b91874
9b91874
%install
9b91874
mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
9b91874
pushd src
9b91874
  pushd lib
9b91874
    for shlib in *.so; do
9b91874
      install -p -m 755 $shlib $RPM_BUILD_ROOT%{_libdir}/$shlib.%{version}
9b91874
      pushd $RPM_BUILD_ROOT%{_libdir}/
9b91874
        ln -s $shlib.%{version} $shlib
9b91874
      popd
9b91874
    done
9b91874
  popd
9b91874
  for hdr in include/*.h; do
9b91874
    install -p -m 644 $hdr $RPM_BUILD_ROOT%{_includedir}/%{name}/
9b91874
  done
9b91874
popd
9b91874
9b91874
9b91874
%check
66a6570
make -C src check LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
9b91874
9b91874
9b91874
%post -p /sbin/ldconfig
9b91874
9b91874
9b91874
%postun -p /sbin/ldconfig
9b91874
9b91874
9b91874
%files
9b91874
%doc SPKG.txt
9b91874
%{_libdir}/libg0nntl.so.*
9b91874
%{_libdir}/libcurvesntl.so.*
9b91874
%{_libdir}/libjcntl.so.*
9b91874
%{_libdir}/librankntl.so.*
9b91874
9b91874
9b91874
%files devel
66a6570
%doc src/g0n/documentation.txt
66a6570
%doc ChangeLog.procs ChangeLog.qcurves ChangeLog.qrank
9b91874
%{_includedir}/%{name}
9b91874
%{_libdir}/libg0nntl.so
9b91874
%{_libdir}/libcurvesntl.so
9b91874
%{_libdir}/libjcntl.so
9b91874
%{_libdir}/librankntl.so
9b91874
9b91874
9b91874
%changelog
a35ea0e
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20100711-3
a35ea0e
- Rebuilt for c++ ABI breakage
a35ea0e
ded8f01
* Tue Jan 10 2012 Jerry James <loganjerry@gmail.com> - 20100711-2
ded8f01
- Rebuild for GCC 4.7
ded8f01
4ef23e2
* Thu Oct 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 20100711-1.2
4ef23e2
- rebuild with new gmp without compat lib
4ef23e2
26b06ce
* Mon Oct 10 2011 Peter Schiffer <pschiffe@redhat.com> - 20100711-1.1
26b06ce
- rebuild with new gmp
26b06ce
66a6570
* Mon May 23 2011 Jerry James <loganjerry@gmail.com> - 20100711-1
66a6570
- New upstream version
66a6570
- Drop unnecessary elements of the spec file (BuildRoot, clean script, etc.)
66a6570
- Convert previous patches into sed expressions
66a6570
- Add compiler warning elimination patch
66a6570
- Eliminate unused direct shared library dependencies
66a6570
- Fix the FSF's address to make rpmlint shut up
66a6570
- Add documentation to -devel
66a6570
bc5c334
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20080310-10.p10
bc5c334
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bc5c334
4691eb6
* Thu Aug 19 2010 Thomas Spura <tomspur@fedoraproject.org> - 20080310-9.p10
4691eb6
- update to patched version
4691eb6
345be04
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20080310-9.p7
345be04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
345be04
9b91874
* Mon May 18 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-8.p7
9b91874
- Make only shared libs.
9b91874
9b91874
* Fri May 8 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-7.p7
9b91874
- Kill parallel make to fix the build (thanks Mamoru Tasaka).
9b91874
9b91874
* Sun Mar 22 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-6.p7
9b91874
- Incorporate Michael Schwendt's patch to fix the build process
9b91874
  (thanks again :)).
9b91874
9b91874
* Fri Mar 20 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-5.p7
9b91874
- Changed BR on ntl-devel to ntl-static.
9b91874
9b91874
* Fri Mar 20 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-4.p7
9b91874
- Fixed path in %%check section.
9b91874
9b91874
* Thu Mar 19 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-3.p7
9b91874
- Move libraries back to _libdir proper and add main package.
9b91874
- Added check section (thanks Michael Schwendt) commented out because
9b91874
  it doesn't pass right now.
9b91874
- Add a versioned SONAME.
9b91874
9b91874
* Wed Mar 18 2009 Conrad Meyer <konrad@tylerc.org> - 20080310-2.p7
9b91874
- Fix soname mess.
9b91874
- Use install -p.
9b91874
9b91874
* Sat Dec 13 2008 Conrad Meyer <konrad@tylerc.org> - 20080310-1.p7
9b91874
- Initial package.