File cln.spec of Package cln
#
# spec file for package cln (Version 1.3.1)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: cln
BuildRequires: gcc-c++ gmp-devel pkg-config texinfo
Url: http://www.ginac.de/CLN/
Version: 1.3.1
Release: 1
Summary: Class Library for Numbers (C++)
License: GPLv2+
Group: Productivity/Scientific/Math
Provides: libcln pi
PreReq: %install_info_prereq
AutoReqProv: on
Source0: cln-%version.tar.bz2
Source1: pi.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
%description
CLN features a rich set of number classes: integer (unlimited
precision), rational, short float, single float, double float, long
float (unlimited precision), complex, modular integer, and univariate
polynomial. It implements elementary, logical, and transcendental
functions. C++ as the implementation language brings efficiency, type
safety, and algebraic syntax. Memory efficiency: small integers and
short floats are immediate, not heap allocated. Automatic,
noninterruptive garbage collection. Speed efficiency: assembly
language kernel for some CPUs, Karatsuba and Schoenhage-Strassen
multiplication. Interoperability: garbage collection with no burden on
the main application, hooks for memory allocation and exceptions.
The following C++ features are used: classes, member functions,
overloading of functions and operators, constructors and destructors,
inline, const, multiple inheritance, templates, and namespaces. The
following C++ features are not used: new, delete, virtual inheritance,
and exceptions.
%package devel
Summary: Class Library for Numbers (C++)
Group: Productivity/Scientific/Math
AutoReqProv: on
PreReq: %install_info_prereq
License: GPLv2+
Requires: %{name} = %{version}
%description devel
CLN features a rich set of number classes: integer (unlimited
precision), rational, short float, single float, double float, long
float (unlimited precision), complex, modular integer, and univariate
polynomial. It implements elementary, logical, and transcendental
functions. C++ as the implementation language brings efficiency, type
safety, and algebraic syntax. Memory efficiency: small integers and
short floats are immediate, not heap allocated. Automatic,
noninterruptive garbage collection. Speed efficiency: assembly
language kernel for some CPUs, Karatsuba and Schoenhage-Strassen
multiplication. Interoperability: garbage collection with no burden on
the main application, hooks for memory allocation and exceptions.
The following C++ features are used: classes, member functions,
overloading of functions and operators, constructors and destructors,
inline, const, multiple inheritance, templates, and namespaces. The
following C++ features are not used: new, delete, virtual inheritance,
and exceptions.
%prep
%setup -q -a 1
%build
CFLAGS="$RPM_OPT_FLAGS -fno-unit-at-a-time" \
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-unit-at-a-time -fno-reorder-blocks" \
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_prefix}/lib/%{name} \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--disable-static
%{__make} %{?jobs:-j%jobs}
%{__make} %{?jobs:-j%jobs} check
#cd benchmarks
#for i in a ap b ; do
# ./timebench2$i -r 10
#done
#cd ..
g++ $RPM_OPT_FLAGS -I./include pi.cc -o pi -L./src/.libs/ -lcln -lgmp
%{__make} %{?jobs:-j%jobs} html
%install
%{__mkdir} -p $RPM_BUILD_ROOT/%{_datadir}/doc/packages/cln
PDOCDIR=/usr/share/doc/packages/cln
%{__make} install MANDIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT htmldir=$PDOCDIR
install -m 755 pi $RPM_BUILD_ROOT/usr/bin
rm -f $RPM_BUILD_ROOT/usr/%_lib/libcln.la
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files
%defattr(-,root,root)
%{_bindir}/pi
%{_libdir}/libcln.so.*
%files devel
%defattr(-,root,root)
%doc README NEWS
#/usr/bin/cln-config
%{_includedir}/cln
%{_infodir}/cln.info.gz
%{_mandir}/man1/pi.1.gz
%{_libdir}/libcln.so
%{_libdir}/pkgconfig/cln.pc
#%doc /usr/share/man/man1/cln-config.1.gz
#/usr/share/aclocal/cln.m4
%changelog