Name: givaro Version: 3.3.1 Release: 1%{?dist} Summary: C++ library for arithmetic and algebraic computations Group: Development/Libraries License: CeCILL-B URL: http://ljk.imag.fr/CASYS/LOGICIELS/givaro/ Source0: http://ljk.imag.fr/CASYS/LOGICIELS/givaro/givaro-%{version}.tar.gz Source1: givaro-config.h Patch0: givaro-config-script.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gmp-devel %description Givaro is a C++ library for arithmetic and algebraic computations. Its main features are implementations of the basic arithmetic of many mathematical entities: Primes fields, Extensions Fields, Finite Fields, Finite Rings, Polynomials, Algebraic numbers, Arbitrary precision integers and rationals (C++ wrappers over gmp) It also provides data-structures and templated classes for the manipulation of basic algebraic objects, such as vectors, matrices (dense, sparse, structured), univariate polynomials (and therefore recursive multivariate). %package devel Summary: Files useful for %{name} development Group: Development/Libraries Requires: %{name} = %{version}-%{release} %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} = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} %description static The static libraries for using %{name} for development. %prep %setup -q cp %{SOURCE1} new-givaro-config.h sed -i -e 's|^#define __GIVARO_VERSION.*$|#define __GIVARO_VERSION "%{version}"|' new-givaro-config.h for i in Licence_CeCILL-B_V1-fr.txt Licence_CeCILL-B_V1-en.txt; do iconv -f iso8859-1 -t utf-8 $i > $i.new && \ touch -r $i $i.new && \ mv $i.new $i done %patch0 %build %configure --with-gmp --enable-shared=yes make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la rm -f $RPM_BUILD_ROOT%{_includedir}/givaro-config.h install -m 644 new-givaro-config.h $RPM_BUILD_ROOT%{_includedir}/givaro-config.h #givaro-makefile is installed incorrectly in usr/bin mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/ mv $RPM_BUILD_ROOT/%{_bindir}/givaro-makefile $RPM_BUILD_ROOT%{_datadir}/%{name}/ chmod 644 $RPM_BUILD_ROOT%{_datadir}/%{name}/givaro-makefile sed -i 's|#! /bin/sh||' $RPM_BUILD_ROOT%{_datadir}/%{name}/givaro-makefile %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYRIGHT Licence_CeCILL-B_V1-en.txt Licence_CeCILL-B_V1-fr.txt %{_libdir}/lib%{name}.so.* %files devel %defattr(-,root,root,-) %{_bindir}/%{name}-config %{_includedir}/%{name}/ %{_includedir}/gmp++/ %{_datadir}/%{name}/ %{_includedir}/%{name}-config.h %{_libdir}/lib%{name}.so %files static %defattr(-,root,root,-) %{_libdir}/lib%{name}.a %changelog * Fri Oct 09 2009 D Haley - 3.3.1-1 - Update to 3.3.0 - Relicence per CeCILL-B * Sun Sep 12 2009 D Haley - 3.2.15-0.2.rc1 - Change to GPL+ from GPL2 per bugzilla comment * Sun Aug 23 2009 D Haley - 3.2.15-0.1.rc1 - Upgrade to 3.2.15rc1 - Modify givaro-config.in to allow multiple flags simultaneously * Sat Dec 6 2008 Conrad Meyer - 3.2.13-2 - Fix endian header to be non-endian. * Sat Dec 6 2008 Conrad Meyer - 3.2.13-1 - Initial package.