gfan/gfan.spec

104 lines
2.9 KiB
RPMSpec

#
# spec file for package gfan
#
# Copyright (c) 2011 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/
#
Name: gfan
%define lname libgfan-0_5
Version: 0.5
Release: 0
Group: Productivity/Scientific/Math
Summary: Calculation of Gröbner fans
License: GPL-2.0
URL: http://home.imf.au.dk/jensen/software/gfan/gfan.html
Source: %name%version.tar.bz2
Patch1: gfan-automake.diff
Patch2: gfan-format.diff
Patch3: gfan-returns.diff
Patch4: gfan-remove-debug-code.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cddlib-devel, gcc-c++, gmp-devel, libtool >= 2
%define with_pdf 1
%if 0%{?with_pdf}
BuildRequires: texlive-latex
%if 0%{?suse_version} >= 1230
BuildRequires: texlive-bibtex, texlive-dvips, texlive-ntgclass, texlive-ulem
%endif
%endif
%description
Gfan is a software package for computing Gröbner fans and tropical
varieties. These are polyhedral fans associated to polynomial ideals.
%package -n %lname
Summary: Library for calculation of Gröbner fans
Group: System/Libraries
%description -n %lname
Gfan is a software package for computing Gröbner fans and tropical
varieties. These are polyhedral fans associated to polynomial ideals.
%package -n libgfan-devel
Summary: Development files for libgfan
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description -n libgfan-devel
Gfan is a software package for computing Gröbner fans and tropical
varieties. These are polyhedral fans associated to polynomial ideals.
%prep
%setup -qn %name%version
%patch -P 1 -P 2 -P 3 -P 4 -p1
%build
autoreconf -fi;
%if 0%{?suse_version} <= 1110
# -Wno-unused-result is not a recognized option of gcc 4.3
export CXXFLAGS="%optflags -Wno-sign-compare -Wno-reorder -Wno-unused";
%else
export CXXFLAGS="%optflags -Wno-sign-compare -Wno-reorder -Wno-unused -Wno-unused-result";
%endif
%configure --disable-static
make %{?_smp_mflags};
%if 0%{?with_pdf}
make -C doc %{?_smp_mflags};
%endif
%install
b="%buildroot";
make install DESTDIR="$b";
rm -f "$b/%_libdir"/*.la;
%files
%defattr(-,root,root)
%_bindir/gfan
%doc examples
%if 0%{?with_pdf}
%doc doc/manual.pdf
%endif
%files -n %lname
%defattr(-,root,root)
%_libdir/libgfan-%version.so
%files -n libgfan-devel
%defattr(-,root,root)
%_libdir/libgfan.so
%_includedir/*
%changelog