File form.spec of Package form

#
# spec file for package form
#
# 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/
#


%define reldate 20131025
Name:           form
Version:        4.1
Release:        0
Summary:        A Symbolic Manipulation System
License:        GPL-3.0+
Group:          Productivity/Scientific/Math
Url:            https://github.com/vermaseren/form/
Source0:        https://github.com/vermaseren/form/archive/v%{version}-%{reldate}.tar.gz
Source1:        %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM form-devref-pdf.patch badshah400@gmail.com -- Fix a typo preventing devref PDF from generating
Patch0:         form-devref-pdf.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gmp-devel
BuildRequires:  libtool
BuildRequires:  openmpi-devel
BuildRequires:  pkgconfig
BuildRequires:  texlive-tex4ht
BuildRequires:  pkgconfig(zlib)
BuildRequires:  tex(adjustbox.sty)
BuildRequires:  tex(amssymb.sty)
BuildRequires:  tex(calc.sty)
BuildRequires:  tex(caption.sty)
BuildRequires:  tex(courier.sty)
BuildRequires:  tex(fancyhdr.sty)
BuildRequires:  tex(fixltx2e.sty)
BuildRequires:  tex(fontenc.sty)
BuildRequires:  tex(geometry.sty)
BuildRequires:  tex(graphicx.sty)
BuildRequires:  tex(helvet.sty)
BuildRequires:  tex(hyperref.sty)
BuildRequires:  tex(ifpdf.sty)
BuildRequires:  tex(inputenc.sty)
BuildRequires:  tex(makeidx.sty)
BuildRequires:  tex(multicol.sty)
BuildRequires:  tex(multirow.sty)
BuildRequires:  tex(natbib.sty)
BuildRequires:  tex(sectsty.sty)
BuildRequires:  tex(textcomp.sty)
BuildRequires:  tex(tocloft.sty)
BuildRequires:  tex(wasysym.sty)
BuildRequires:  tex(xcolor.sty)
Recommends:     %{name}-doc = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FORM is a Symbolic Manipulation System. It reads symbolic expressions from files
and executes symbolic/algebraic transformations upon them. The answers are
returned in a textual mathematical representation. As its landmark feature, the
size of the considered expressions in FORM is only limited by the available
disk space and not by the available RAM.

%package doc
Summary:        Additional documentation for %{name} - A Symbolic Manipulation System
Group:          Documentation/HTML

%description doc
FORM is a Symbolic Manipulation System. It reads symbolic expressions from files
and executes symbolic/algebraic transformations upon them. The answers are
returned in a textual mathematical representation. As its landmark feature, the
size of the considered expressions in FORM is only limited by the available
disk space and not by the available RAM.

This package provides additional documentation for %{name}.

%prep
%setup -q -n %{name}-%{version}-%{reldate}
%patch0 -p1

# REPLACE __DATE__ BY %%{reldate} USED TO TAG THE SOURCE TARBALL
sed -i "s/PRODUCTIONDATE __DATE__/PRODUCTIONDATE %{reldate}/" sources/form3.h
sed -i "s/PRODUCTIONDATE __DATE__/PRODUCTIONDATE %{reldate}/" configure.ac

%build
autoreconf -fvi
%configure --enable-parform
make %{?_smp_mflags}

# MAKE DOCUMENTATION
pushd doc
make %{?_smp_mflags} pdf
make %{?_smp_mflags} html
popd

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install

%fdupes -s doc

%files
%defattr(-,root,root)
%doc AUTHORS README.md COPYING
%doc doc/manual/manual.pdf
%doc doc/manual/html/
%{_bindir}/form
%{_bindir}/tform
%{_bindir}/parform

%files doc
%defattr(-,root,root)
%doc doc/doxygen/html/
%doc doc/devref/devref.pdf
%doc doc/devref/html/

%changelog