Blob Blame History Raw
Name:           normaliz
Version:        2.7
Release:        4%{?dist}.2
Summary:        A tool for mathematical computations

Group:          Applications/Engineering
License:        GPLv3
URL:            http://www.mathematik.uni-osnabrueck.de/normaliz/
# Warning: This zip-ball contains .jar binaries, source only zip-ball not
# available
Source0:        http://www.mathematik.uni-osnabrueck.de/normaliz/Normaliz%{version}/Normaliz%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  boost-devel
BuildRequires:  gmp-devel

%description
Normaliz is a (command line) tool for computations in affine
monoids, vector configurations, lattice polytopes,  and rational
cones.

Documentation and examples can be found in %{_docdir}/%{name}-%{version}, 
in particular you may find Normaliz%{version}Documentation.pdf useful.  

%prep
%setup -q -n Normaliz%{version}

%build
pushd source
# We want to use our build flags
sed -i 's/^\(CXXFLAGS\s*=\)/#\1/' Makefile
# Static linking should be avoided
sed -i 's/^\(N[A-Z0-9]*FLAGS\s*=.*\s\)-static/\1/' Makefile Makefile.configuration

CXXFLAGS="%{optflags}" \
make %{?_smp_mflags}
popd

mkdir -p docs/example

# Correct the end of line encodings for use on Linux
pushd example
for file in *.out *.in 
do
    sed 's/\r//' "$file" > "../docs/example/$file"
    touch -r "$file" "../docs/example/$file"
done
popd

mv doc/Normaliz%{version}Documentation.pdf docs
mv "doc/Computing the integral closure of an affine semigroup.pdf" \
    docs/Computing_the_integral_closure_of_an_affine_semigroup.pdf


%install
rm -rf %{buildroot}

install -D -m 755 source/normaliz %{buildroot}%{_bindir}/normaliz

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING
%doc docs/*
%{_bindir}/normaliz

%changelog
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7-4.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7-3.2
- Rebuilt for c++ ABI breakage

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7-2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Oct 26 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2.7-1.2
- rebuild with new gmp without compat lib

* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 2.7-1.1
- rebuild with new gmp

* Fri May 27 2011 Rex Dieter <rdieter@fedoraproject.org> 2.7-1
- 2.7

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Feb 25 2010 Mark Chappell <tremble@fedoraproject.org> - 2.2-3
- Preserve timestamps on examples
- Ensure that the first command in install is to wipe the buildroot
- Tweak to description

* Thu Feb 25 2010 Mark Chappell <tremble@fedoraproject.org> - 2.2-2
- Move examples into a subdirectory
- Correct inconsistant use of macros
- Provide a reference to the documentation in the description

* Wed Feb 24 2010 Mark Chappell <tremble@fedoraproject.org> - 2.2-1
- Initial build