b5c95a0
Name:           gfan
b5c95a0
Version:        0.3
5a3791c
Release:        5%{?dist}
b5c95a0
Summary:        Software for Computing Gröbner Fans and Tropical Varieties
b5c95a0
Group:          Applications/Engineering
b5c95a0
License:        GPL+
b5c95a0
URL:            http://www.math.tu-berlin.de/%7Ejensen/software/gfan/gfan.html
b5c95a0
Source0:        http://www.math.tu-berlin.de/%7Ejensen/software/gfan/gfan%{version}.tar.gz
b5c95a0
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b5c95a0
# Respect DESTDIR
b5c95a0
Patch0:         gfan-0.3-respect-destdir.diff
b5c95a0
b5c95a0
BuildRequires:  cddlib-devel
b5c95a0
BuildRequires:  gmp-devel
b5c95a0
BuildRequires:  texlive-latex
b5c95a0
b5c95a0
b5c95a0
%description
b5c95a0
The software computes all marked reduced Gröbner bases of an ideal.
b5c95a0
Their union is a universal Gröbner basis. Gfan contains algorithms for
b5c95a0
computing this complex for general ideals and specialized algorithms
b5c95a0
for tropical curves, tropical hypersurfaces and tropical varieties of
b5c95a0
prime ideals. In addition to the above core functions the package
b5c95a0
contains many tools which are useful in the study of Gröbner bases,
b5c95a0
initial ideals and tropical geometry. Among these are an interactive
b5c95a0
traversal program for Gröbner fans and programs for graphical renderings.
b5c95a0
b5c95a0
b5c95a0
b5c95a0
%prep
b5c95a0
%setup -q -n %{name}%{version}
b5c95a0
# manual is non-free
b5c95a0
rm doc/ -rf
b5c95a0
b5c95a0
# Use native fedora optflags, prefix, and bindir
b5c95a0
sed -i -e 's|^OPTFLAGS.*$||' \
b5c95a0
  -e 's|^PREFIX.*$|PREFIX = %{_prefix}|' \
b5c95a0
  -e 's|^BINDIR.*$|BINDIR = %{_bindir}|' Makefile
b5c95a0
b5c95a0
# respect DESTDIR
b5c95a0
%patch0
b5c95a0
b5c95a0
b5c95a0
%build
5a3791c
export OPTFLAGS="%{optflags} -DGMPRATIONAL -I/usr/include/cddlib"
b5c95a0
make %{?_smp_mflags}
b5c95a0
b5c95a0
b5c95a0
%install
b5c95a0
rm -rf $RPM_BUILD_ROOT
b5c95a0
make install DESTDIR=$RPM_BUILD_ROOT
b5c95a0
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
b5c95a0
mv $RPM_BUILD_ROOT%{_bindir}/gfan_* $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
b5c95a0
pushd $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
b5c95a0
  for symlink in gfan_*; do
b5c95a0
    rm $symlink
b5c95a0
#   ln -s %{_bindir}/%{name} $symlink
b5c95a0
    ln -s ../../bin/%{name} $symlink
b5c95a0
  done
b5c95a0
popd
b5c95a0
b5c95a0
b5c95a0
%clean
b5c95a0
rm -rf $RPM_BUILD_ROOT
b5c95a0
b5c95a0
b5c95a0
%files
b5c95a0
%defattr(-,root,root,-)
b5c95a0
%doc COPYING examples LICENSE
b5c95a0
%{_bindir}/%{name}
b5c95a0
%{_libexecdir}/%{name}
b5c95a0
b5c95a0
b5c95a0
%changelog
5a3791c
* Thu Feb 26 2009 Conrad Meyer <konrad@tylerc.org> - 0.3-5
5a3791c
- Include the right place for headers (fix FTBFS).
5a3791c
5fa7c7c
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
5fa7c7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5fa7c7c
b5c95a0
* Tue Dec 30 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-3
b5c95a0
- Fix License tag.
b5c95a0
- Fix build section.
b5c95a0
- Remove doc/ in prep stage as it is non-free.
b5c95a0
b5c95a0
* Fri Dec 12 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-2
b5c95a0
- BR texlive-latex.
b5c95a0
b5c95a0
* Sat Dec 6 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-1
b5c95a0
- Initial package.