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