File ntl.spec of Package ntl
#
# spec file for package ntl
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ntl
%define lname libntl0
Version: 5.5.2
Release: 0
Summary: Library for Number Theory
Group: Productivity/Scientific/Math
License: GPL-2.0+
URL: http://shoup.net/ntl/
Source: ntl-%version.tar.bz2
Patch1: ntl-automake.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf, automake, libtool
BuildRequires: gcc-c++ gf2x-devel gmp-devel >= 3.1
%description
NTL is a high-performance, portable C++ library providing data
structures and algorithms for manipulating signed, arbitrary length
integers, and for vectors, matrices, and polynomials over the
integers and over finite fields.
%package -n %lname
Summary: Library for Number Theory
Group: System/Libraries
%description -n %lname
NTL is a high-performance, portable C++ library providing data
structures and algorithms for manipulating signed, arbitrary length
integers, and for vectors, matrices, and polynomials over the
integers and over finite fields.
%package devel
Summary: Development files for libntl
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
NTL is a high-performance, portable C++ library providing data
structures and algorithms for manipulating signed, arbitrary length
integers, and for vectors, matrices, and polynomials over the
integers and over finite fields.
This package contains the headers and library links to libntl.
%prep
%setup -qn ntl-%version
%patch -P 1 -p1
pushd src/;
for i in *.c; do
mv "$i" "${i%.c}.cpp";
done;
for i in GetTime*.cpp MakeDesc*.cpp; do
mv "$i" "${i%.cpp}.c";
done;
for i in ctools gen_gmp_aux gen_lip_gmp_aux lip; do
mv "$i.cpp" "$i.c";
done;
rm -f makefile;
popd;
%build
mkdir -p m4;
autoreconf -fi;
%configure --disable-static
make %{?_smp_mflags};
%install
b="%buildroot";
make install DESTDIR="$b";
rm -f "$b/%_libdir"/*.la;
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%_libdir/libntl.so.0*
%files devel
%defattr(-,root,root)
%_includedir/NTL
%_libdir/libntl.so
%doc doc/*
%changelog