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