File ginac.spec of Package ginac

#
# spec file for package ginac
#
# Copyright (c) 2015 SUSE LINUX 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/
#


%define library_version 5
Name:           ginac
Version:        1.6.4
Release:        0
Summary:        C++ library for symbolic calculations
License:        GPL-2.0
Group:          Development/Libraries/C and C++
Url:            http://www.ginac.de/
Source0:        http://www.ginac.de/%{name}-%{version}.tar.bz2
Patch0:         ginac-return-in-nonvoid.patch
BuildRequires:  cln-devel
BuildRequires:  gcc-c++
BuildRequires:  gmp-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  python
BuildRequires:  readline-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is an
open framework for symbolic computation within the C++ programming language.

%package -n libginac%{library_version}
Summary:        C++ library for symbolic calculations
Group:          Development/Libraries/C and C++

%description -n libginac%{library_version}

GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is an
open framework for symbolic computation within the C++ programming language.

%package -n libginac-devel
Summary:        GiNaC development libraries and header files
Group:          Development/Libraries/C and C++
Requires:       cln-devel
Requires:       libginac%{library_version} = %{version}
PreReq:         %{install_info_prereq}

%description -n libginac-devel
GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is an
open framework for symbolic computation within the C++ programming language.

This package contains the libraries, include files and other resources you
use to develop GiNaC applications.

%prep
%setup -q
%patch0
echo $PATH

%build
autoreconf -fiv
%configure --disable-static --with-pic --disable-rpath
make

%check
export MALLOC_CHECK_=2
make check
unset MALLOC_CHECK_

%install
make DESTDIR=%{buildroot} install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n libginac%{library_version} -p /sbin/ldconfig

%postun -n libginac%{library_version} -p /sbin/ldconfig

%post -n libginac-devel
%install_info --info-dir=%{_infodir} %{_infodir}/ginac.info.gz

%preun -n libginac-devel
%install_info_delete  --info-dir=%{_infodir} %{_infodir}/ginac.info.gz


%files -n libginac%{library_version}
%defattr(-,root,root)
%{_libdir}/libginac.so.%{library_version}*

%files -n libginac-devel
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/*.so
%{_libdir}/pkgconfig/ginac.pc
%dir %{_includedir}/ginac
%{_includedir}/ginac/*.h
%{_infodir}/*.info*

%files
%defattr(-,root,root)
%{_bindir}/ginsh
%{_bindir}/viewgar
%{_bindir}/ginac-excompiler
%{_mandir}/man1/ginsh.1*
%{_mandir}/man1/viewgar.1*

%changelog
openSUSE Build Service is sponsored by