4abefac
Name:           4ti2
4abefac
Version:        1.3.2
4abefac
Release:        5%{?dist}
4abefac
Summary:        A software package for problems on linear spaces
4abefac
4abefac
Group:          System Environment/Libraries
4abefac
License:        GPLv2+
4abefac
URL:            http://www.4ti2.de/
4abefac
Source0:        http://www.4ti2.de/version_%{version}/%{name}-%{version}.tar.gz
4abefac
Source1:        http://www.4ti2.de/4ti2_manual.pdf
4abefac
Source2:        4ti2.module.in
4abefac
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4abefac
4abefac
Requires:       environment-modules
4abefac
BuildRequires:  gmp-devel
4abefac
BuildRequires:  glpk-devel
4abefac
4abefac
%description
4abefac
A software package for algebraic, geometric and combinatorial
4abefac
problems on linear spaces.
4abefac
4abefac
This package uses Environment Modules, to load the binaries onto
4abefac
your PATH you will need to run module load %{name}-%{_arch}
4abefac
4abefac
%prep
4abefac
%setup -q
4abefac
cp -p %{SOURCE1} .
4abefac
4abefac
%build
4abefac
CXXFLAGS="%{optflags} -I%{_includedir}/glpk" \
4abefac
CFLAGS="%{optflags} -I%{_includedir}/glpk" \
4abefac
./configure --disable-shared --disable-static \
4abefac
            --prefix=%{_libdir}/%{name} \
4abefac
            --libdir=%{_libdir}/%{name}/lib/ \
4abefac
            --bindir=%{_libdir}/%{name}/bin/
4abefac
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
4abefac
4abefac
make %{?_smp_mflags}
4abefac
4abefac
%install
4abefac
rm -rf %{buildroot}
4abefac
4abefac
make install-exec DESTDIR=%{buildroot}
4abefac
4abefac
# Make the environment-modules file
4abefac
mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles/
4abefac
# Since we're doing our own substitution here, use our own definitions.
4abefac
sed 's#@LIBDIR@#'%{_libdir}/%{name}'#g;' < %SOURCE2 >%{buildroot}%{_datadir}/Modules/modulefiles/%{name}-%{_arch} 
4abefac
4abefac
# The libraries are not really fit for use outside the package.
4abefac
rm -rf %{buildroot}/%{_libdir}/%{name}/lib*
4abefac
4abefac
%check
4abefac
make check
4abefac
4abefac
%clean
4abefac
rm -rf %{buildroot}
4abefac
4abefac
%files
4abefac
%defattr(-,root,root,-)
4abefac
%doc COPYING TODO 4ti2_manual.pdf
4abefac
%{_datadir}/Modules/modulefiles/%{name}-%{_arch} 
4abefac
%{_libdir}/%{name}/bin/output
4abefac
%{_libdir}/%{name}/bin/4ti2gmp
4abefac
%{_libdir}/%{name}/bin/4ti2int32
4abefac
%{_libdir}/%{name}/bin/4ti2int64
4abefac
%{_libdir}/%{name}/bin/circuits
4abefac
%{_libdir}/%{name}/bin/genmodel
4abefac
%{_libdir}/%{name}/bin/gensymm
4abefac
%{_libdir}/%{name}/bin/graver
4abefac
%{_libdir}/%{name}/bin/groebner
4abefac
%{_libdir}/%{name}/bin/hilbert
4abefac
%{_libdir}/%{name}/bin/markov
4abefac
%{_libdir}/%{name}/bin/minimize
4abefac
%{_libdir}/%{name}/bin/normalform
4abefac
%{_libdir}/%{name}/bin/ppi
4abefac
%{_libdir}/%{name}/bin/qsolve
4abefac
%{_libdir}/%{name}/bin/rays
4abefac
%{_libdir}/%{name}/bin/walk
4abefac
%{_libdir}/%{name}/bin/zbasis
4abefac
%{_libdir}/%{name}/bin/zsolve
4abefac
4abefac
%changelog
4abefac
* Tue Mar 02 2010 Mark Chappell <tremble@fedoraproject.org> - 1.3.2-5
4abefac
- Add note to description about environment modules
4abefac
4abefac
* Tue Mar 02 2010 Mark Chappell <tremble@fedoraproject.org> - 1.3.2-4
4abefac
- Switch to using modules
4abefac
- Tag with the correct licence (GPLv2+)
4abefac
4abefac
* Thu Feb 25 2010 Mark Chappell <tremble@fedoraproject.org> - 1.3.2-3
4abefac
- Preserve time stamp on 4ti2_manual.pdf
4abefac
- Whitespace cleanup
4abefac
- Remove obsolete post and portun calls
4abefac
- Manually specify binaries
4abefac
4abefac
* Thu Feb 25 2010 Mark Chappell <tremble@fedoraproject.org> - 1.3.2-2
4abefac
- Tidy up inconsistant use of macros
4abefac
- Remove empty devel package
4abefac
- Include 4ti2 manual
4abefac
4abefac
* Wed Feb 17 2010 M D Chappell <tremble@tremble.org.uk> - 1.3.2-1
4abefac
- Initial build