Name: eclib Version: 20080310 Release: 8.p7%{?dist} Summary: A Library for Doing Computations on Elliptic Curves Group: Applications/Engineering License: GPLv2+ URL: http://www.warwick.ac.uk/~masgaj/ Source0: http://sagemath.org/packages/standard/eclib-%{version}.p7.spkg # Add sonames to the built shared libraries Patch0: eclib-20080310.p7-add-soname.diff # Adds Fedora optflags to build process without breaking -Defines Patch1: eclib-20080310.p7-use-fedora-optflags.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gmp-devel BuildRequires: ntl-devel BuildRequires: pari-devel %description John Cremona's programs for enumerating and computating with elliptic curves defined over the rational numbers. %package devel Summary: Development Files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Development libraries and headers for %{name}. %package static Summary: Static Libraries for %{name} Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static Static libraries for %{name}. %prep %setup -q -n %{name}-%{version}.p7 sed -i -e 's|^install_lib:.*$|install_lib: $(HEADERS) lib|' \ src/qrank/Makefile %patch0 -p0 sed -i -e 's|__SO_VERSION__|%{version}|' \ src/Makefile.dynamic %patch1 -p1 %build export PICFLAG=-fPIC pushd src # Parallel make breaks this build (so no %{?_smp_mflags} for us). make make so popd %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}} pushd src pushd lib for shlib in *.so; do install -p -m 755 $shlib $RPM_BUILD_ROOT%{_libdir}/$shlib.%{version} pushd $RPM_BUILD_ROOT%{_libdir}/ ln -s $shlib.%{version} $shlib popd done # for stlib in *.a; do # install -p -m 644 $stlib $RPM_BUILD_ROOT%{_libdir}/ # done popd for hdr in include/*.h; do install -p -m 644 $hdr $RPM_BUILD_ROOT%{_includedir}/%{name}/ done popd %check cd src export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}/ make check %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc SPKG.txt %{_libdir}/libg0nntl.so.* %{_libdir}/libcurvesntl.so.* %{_libdir}/libjcntl.so.* %{_libdir}/librankntl.so.* %files devel %defattr(-,root,root,-) %{_includedir}/%{name} %{_libdir}/libg0nntl.so %{_libdir}/libcurvesntl.so %{_libdir}/libjcntl.so %{_libdir}/librankntl.so #%%files static #%%defattr(-,root,root,-) #%%{_libdir}/libg0nntl.a #%%{_libdir}/libcurvesntl.a #%%{_libdir}/libjcntl.a #%%{_libdir}/librankntl.a %changelog * Mon May 18 2009 Conrad Meyer - 20080310-8.p7 - Make only shared libs. * Fri May 8 2009 Conrad Meyer - 20080310-7.p7 - Kill parallel make to fix the build (thanks Mamoru Tasaka). * Sun Mar 22 2009 Conrad Meyer - 20080310-6.p7 - Incorporate Michael Schwendt's patch to fix the build process (thanks again :)). * Fri Mar 20 2009 Conrad Meyer - 20080310-5.p7 - Changed BR on ntl-devel to ntl-static. * Fri Mar 20 2009 Conrad Meyer - 20080310-4.p7 - Fixed path in %%check section. * Thu Mar 19 2009 Conrad Meyer - 20080310-3.p7 - Move libraries back to _libdir proper and add main package. - Added check section (thanks Michael Schwendt) commented out because it doesn't pass right now. - Add a versioned SONAME. * Wed Mar 18 2009 Conrad Meyer - 20080310-2.p7 - Fix soname mess. - Use install -p. * Sat Dec 13 2008 Conrad Meyer - 20080310-1.p7 - Initial package.