873b27f
Name:           4ti2
873b27f
Version:        1.3.2
760b6ae
Release:        12%{?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
3d04b28
Patch0:         4ti2-1.3.2-gcc47.patch
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} .
3d04b28
%patch0 -p1 -b .gcc47
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
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
%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
760b6ae
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-12
760b6ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
760b6ae
3d04b28
* Mon Mar  5 2012 Tom Callaway <spot@fedoraproject.org> - 1.3.2-11
3d04b28
- fix gcc47 issues
3d04b28
4dfef1f
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-10
4dfef1f
- Rebuilt for c++ ABI breakage
4dfef1f
8321756
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-9
8321756
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8321756
7ae6048
* Wed Nov 16 2011 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.2-8
7ae6048
- Rebuild for new gmp
7ae6048
Marcela Mašláňová 4632109
* Wed Sep 21 2011 Peter Schiffer <pschiffe@redhat.com> - 1.3.2-7.1
Marcela Mašláňová 4632109
- rebuild with new gmp
Marcela Mašláňová 4632109
85627e7
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-7
85627e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
85627e7
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