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