Blob Blame History Raw
Name:		givaro
Version:	3.4.2
Release:	1%{?dist}.1
Summary:	C++ library for arithmetic and algebraic computations
Group:		Development/Libraries

License:	CeCILL-B
URL:		http://ljk.imag.fr/CASYS/LOGICIELS/givaro/
Source0:	https://forge.imag.fr/frs/download.php/125/givaro-%{version}.tar.gz
Patch0:		givaro-config-script.patch

BuildRequires:	doxygen
BuildRequires:	gmp-devel
BuildRequires:	tex(latex)


%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}%{?_isa} = %{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}%{?_isa} = %{version}-%{release}
Requires:	%{name}-devel%{?_isa} = %{version}-%{release}


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


%prep
%setup -q
%patch0

# Fix file encodings
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

# Remove unnecessary executable bits
find examples -name Makefile.am | xargs chmod a-x


%build
%configure --enable-shared --enable-docs \
  --docdir=%{_docdir}/%{name}-devel-%{version}

# Fix an unused direct library dependency
sed -i 's/-lm -lgcc_s/-lgcc_s/' libtool

make %{?_smp_mflags}

# Build the developer documentation
cd docs
doxygen DoxyfileDev
cd ..

# We don't want these files with the doxygen-generated files
rm -f docs/givaro-html/{AUTHORS,COPYING,INSTALL}


%install
# Documentation installation is hopelessly broken
sed -i 's/^SUBDIRS =.*/SUBDIRS = src macros tests/' Makefile

make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la

#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 '\%#! /bin/sh%D' $RPM_BUILD_ROOT%{_datadir}/%{name}/givaro-makefile


%check
make check


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%doc COPYRIGHT Licence_CeCILL-B_V1-en.txt Licence_CeCILL-B_V1-fr.txt
%{_libdir}/lib%{name}.so.*


%files devel
%doc docs/givaro-html docs/givaro-dev-html examples
%{_bindir}/%{name}-config
%{_includedir}/%{name}/
%{_includedir}/gmp++/
%{_datadir}/%{name}/
%{_includedir}/%{name}-config.h
%{_libdir}/lib%{name}.so


%files static
%{_libdir}/lib%{name}.a


%changelog
* Tue Oct 11 2011 Peter Schiffer <pschiffe@redhat.com> - 3.4.2-1.1
- rebuild with new gmp

* Tue Jul  5 2011 Jerry James <loganjerry@gmail.com> - 3.4.2-1
- Update to 3.4.2
- Add doxygen documentation and examples to docs

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan 02 2010 D Haley <mycae(a!t)yahoo.com> - 3.3.1-1
- Update to 3.3.1

* Fri Oct 09 2009 D Haley <mycae(a!t)yahoo.com> - 3.3.0-1
- Update to 3.3.0
- Relicence per CeCILL-B

* Sun Sep 12 2009 D Haley <mycae(a!t)yahoo.com> - 3.2.15-0.2.rc1
- Change to GPL+ from GPL2 per bugzilla comment

* Sun Aug 23 2009 D Haley <mycae(a!t)yahoo.com> - 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 <konrad@tylerc.org> - 3.2.13-2
- Fix endian header to be non-endian.

* Sat Dec 6 2008 Conrad Meyer <konrad@tylerc.org> - 3.2.13-1
- Initial package.