Blob Blame History Raw
Name:           4ti2
Version:        1.3.2
Release:        5%{?dist}
Summary:        A software package for problems on linear spaces

Group:          System Environment/Libraries
License:        GPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:       environment-modules
BuildRequires:  gmp-devel
BuildRequires:  glpk-devel

A software package for algebraic, geometric and combinatorial
problems on linear spaces.

This package uses Environment Modules, to load the binaries onto
your PATH you will need to run module load %{name}-%{_arch}

%setup -q
cp -p %{SOURCE1} .

CXXFLAGS="%{optflags} -I%{_includedir}/glpk" \
CFLAGS="%{optflags} -I%{_includedir}/glpk" \
./configure --disable-shared --disable-static \
            --prefix=%{_libdir}/%{name} \
            --libdir=%{_libdir}/%{name}/lib/ \
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool

make %{?_smp_mflags}

rm -rf %{buildroot}

make install-exec DESTDIR=%{buildroot}

# Make the environment-modules file
mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles/
# Since we're doing our own substitution here, use our own definitions.
sed 's#@LIBDIR@#'%{_libdir}/%{name}'#g;' < %SOURCE2 >%{buildroot}%{_datadir}/Modules/modulefiles/%{name}-%{_arch} 

# The libraries are not really fit for use outside the package.
rm -rf %{buildroot}/%{_libdir}/%{name}/lib*

make check

rm -rf %{buildroot}

%doc COPYING TODO 4ti2_manual.pdf

* Tue Mar 02 2010 Mark Chappell <> - 1.3.2-5
- Add note to description about environment modules

* Tue Mar 02 2010 Mark Chappell <> - 1.3.2-4
- Switch to using modules
- Tag with the correct licence (GPLv2+)

* Thu Feb 25 2010 Mark Chappell <> - 1.3.2-3
- Preserve time stamp on 4ti2_manual.pdf
- Whitespace cleanup
- Remove obsolete post and portun calls
- Manually specify binaries

* Thu Feb 25 2010 Mark Chappell <> - 1.3.2-2
- Tidy up inconsistant use of macros
- Remove empty devel package
- Include 4ti2 manual

* Wed Feb 17 2010 M D Chappell <> - 1.3.2-1
- Initial build