File pari-gp-doc.spec of Package pari-gp-doc

Name:           pari-gp-doc
Version:        2.15.2
Release:        1%{?dist}
Summary:        Documentation for the frontend to the PARI Computer Algebra System

# %global majver %(cut -d. -f1-2 <<< %{version})

License:        GPL-2.0-or-later
URL:            http://pari.math.u-bordeaux.fr/
Source0:        http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{version}.tar.gz
# Source1:        http://pari.math.u-bordeaux.fr/pub/pari/unix/%{name}-%{version}.tar.gz.asc
# Public key 0x4522e387, Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
# Source2:        gpgkey-42028EA404A2E9D80AC453148F0E7C2B4522E387.gpg
# Source3:        gp.desktop
# Source4:        pari-gp.xpm
# Source5:        pari.abignore
# Use xdg-open rather than xdvi to display DVI files (#530565)
# Patch0:         pari-2.13.0-xdgopen.patch
# Fix compiler warnings
# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1316
# Patch10:        pari-2.9.0-missing-field-init.patch
# Patch11:        pari-2.13.0-declaration-not-prototype.patch
# Patch12:        pari-2.13.0-clobbered.patch
# Patch13:        pari-2.13.0-signed-unsigned-comparison.patch

# BuildRequires:  coreutils
# BuildRequires:  desktop-file-utils
# BuildRequires:  findutils
# BuildRequires:  fltk-devel
# BuildRequires:  gcc-c++
# BuildRequires:  gmp-devel
# BuildRequires:  gnupg2
# BuildRequires:  make
# BuildRequires:  perl-generators
# BuildRequires:  pkgconfig(readline)
# BuildRequires:  sed
# BuildRequires:  tex(latex)

# Test suite requirements
# BuildRequires:  pari-elldata
# BuildRequires:  pari-galdata
# BuildRequires:  pari-galpol
# BuildRequires:  pari-seadata

# Avoid doc-file dependencies and provides
# %global __provides_exclude_from ^%{_datadir}/pari/PARI/
# %global __requires_exclude_from ^%{_datadir}/pari/PARI/

%description
Documentation for PARI/GP, which is an advanced programmable calculator, which computes
symbolically as long as possible, numerically where needed, and
contains a wealth of number-theoretic functions.

# This package contains the shared libraries. The interactive
# calculator PARI/GP is in package pari-gp.

%prep
%setup -q -n pari-%{version}
# Verify the source file
# %{gpgverify} --data=%{SOURCE0} --signature=%{SOURCE1} --keyring=%{SOURCE2}

# %autosetu -p0

# Silence abidiff warnings about the size of functions_basic[] changing
# cp -p %{SOURCE5} .

# Avoid unwanted rpaths
# sed -i "s|runpathprefix='.*'|runpathprefix=''|" config/get_ld

# %build
# For as yet unknown reasons, 32-bit pari becomes extremely slow if built with
# pthread support.  Enable it for 64-bit only until we can diagnose the issue.
# ./Configure \
#     --prefix=%{_prefix} \
#     --share-prefix=%{_datadir} \
#     --bindir=%{_bindir} \
#     --libdir=%{_libdir} \
#     --mandir=%{_mandir}/man1 \
#     --datadir=%{_datadir}/pari \
#     --includedir=%{_includedir} \
# %if 0%{?__isa_bits} == 64
#     --mt=pthread \
# %endif
#     --enable-tls \
#     --with-fltk \
#     --with-gmp
# %make_build gp

%install
mkdir -p %{buildroot}%{_datadir}/pari/doc
install -p -m 644 doc/* %{buildroot}%{_datadir}/pari/doc/
# %make_install INSTALL="install -p" STRIP=%{_bindir}/true

# Move the library directory on 64-bit systems
# if [ "%{_lib}" != "lib" ]; then
#     mkdir -p %{buildroot}%{_libdir}
#     mv %{buildroot}%{_prefix}/lib/pari %{buildroot}%{_libdir}
# fi

# Site-wide gprc
# mkdir -p %{buildroot}%{_sysconfdir}
# install -p -m 644 misc/gprc.dft %{buildroot}%{_sysconfdir}/gprc

# Desktop menu entry
# mkdir -p %{buildroot}%{_datadir}/applications
# desktop-file-install \
#     --dir %{buildroot}%{_datadir}/applications \
#     %{SOURCE3}
# mkdir -p %{buildroot}%{_datadir}/pixmaps
# install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pixmaps

# Work around package-notes breakage.  The package-notes feature was not
# designed for software like this, which stores flags to use to build other
# software.  All such packages now have to go through contortions like this,
# with the result that the software it builds does NOT have package notes.
# sed -i 's| -Wl,-dT,[^[:blank:]]*\.ld||g' %{buildroot}%{_libdir}/pari/pari.cfg

# %check
# make test-all

%files
%dir %{_datadir}/pari/
%doc %{_datadir}/pari/doc/

# %files
# %license COPYING
# %doc AUTHORS CHANGES* COMPAT NEW README
# %doc pari.abignore
# %{_libdir}/libpari-gmp-tls.so.%{version}
# %{_libdir}/libpari-gmp-tls.so.8
# %{_libdir}/pari/
#
# %files gp
# %{_bindir}/gp
# %{_bindir}/gp-%{majver}
# %{_bindir}/gphelp
# %{_bindir}/tex2mail
# %config(noreplace) %{_sysconfdir}/gprc
# %dir %{_datadir}/pari/
# %doc %{_datadir}/pari/PARI/
# %doc %{_datadir}/pari/doc/
# %doc %{_datadir}/pari/examples/
# %{_datadir}/pari/misc/
# %{_datadir}/pari/pari.desc
# %{_datadir}/applications/gp.desktop
# %{_datadir}/pixmaps/pari-gp.xpm
# %{_mandir}/man1/gp-%{majver}.1*
# %{_mandir}/man1/gp.1*
# %{_mandir}/man1/gphelp.1*
# %{_mandir}/man1/pari.1*
# %{_mandir}/man1/tex2mail.1*
#
# %files devel
# %{_includedir}/pari/
# %{_libdir}/libpari.so

openSUSE Build Service is sponsored by