File libgap.spec of Package libgap

#
# spec file for package libgap
#
# Copyright (c) 2016 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/
#


Name:           libgap
%define lname	libgap-4_8_6-4
Version:        4.8.6
Release:        0
Summary:        System for Computational Discrete Algebra
License:        GPL-2.0+
Group:          Productivity/Scientific/Math
Url:            https://bitbucket.org/vbraun/libgap

#Git-Clone:	https://bitbucket.org/vbraun/libgap.git
Source:         http://files.sagemath.org/spkg/upstream/libgap/%name-%version.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf >= 2.66
BuildRequires:  gmp-devel
BuildRequires:  libtool >= 2
BuildRequires:  ncurses-devel
BuildRequires:  readline-devel
BuildRequires:  unzip

%description
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.

%package -n %lname
Summary:        The GAP discrete algebra kernel as a C library
Group:          System/Libraries

%description -n %lname
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory. GAP provides a programming
language, a library of thousands of functions implementing algebraic
algorithms written in the GAP language as well as large data
libraries of algebraic objects. GAP is used in research and teaching
for studying groups and their representations, rings, vector spaces,
algebras, combinatorial structures, and more.

This package contains the GAP kernel in a C library that can be
linked to.

%package devel
Summary:        Development files for libgap, a CAS kernel
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.

This subpackage contains libraries and header files for developing
applications that want to make use of libgap.

%prep
%setup -q

%build
# Some timestamps appear to be offset, causing aclocal reruns even with
# the pristine tarball. Cure without autoreconf.
autoreconf -fi
%configure --disable-static
# According to https://bitbucket.org/vbraun/libgap/downloads/libGAP.pdf
# there is no proper library interface (and thus, nor versioning thereof,
# I suspect). Add a unique suffix.
make %{?_smp_mflags} LDFLAGS="-release %version"

%install
%make_install
rm -f "%buildroot/%_libdir"/*.la

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libgap-%version.so.4*

%files devel
%defattr(-,root,root)
%_includedir/gap
%_libdir/libgap.so
%doc COPYING README

%changelog
openSUSE Build Service is sponsored by