Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > aef6464fa4954ed2cf1b7a49dd3a20d9 > files > 5

meataxe-2.4.24-5.fc18.src.rpm

Name:           meataxe
Version:        2.4.24
Release:        5%{?dist}
Summary:        Matrix representations over finite fields

Group:          Applications/Engineering
License:        GPLv2+
URL:            http://www.math.rwth-aachen.de/~MTX/
Source0:        http://www.math.rwth-aachen.de/~MTX/%{name}-%{version}.tar.gz
# These man pages were written by Jerry James <loganjerry@gmail.com> using
# text taken from the sources.  Therefore, these pages have the same copyright
# and license as the source files.
Source1:        %{name}-man.tar.xz
# Template for an environment-modules file
Source2:        %{name}.module.in
# This patch causes a shared library to be built instead of a static library,
# and to link all of the binaries against the shared library.  Upstream is
# not interested in building a shared library.
Patch0:         %{name}-shared.patch

BuildRequires:  doxygen-latex
BuildRequires:  ghostscript
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Requires:       environment-modules

%description
The MeatAxe is a set of programs for working with matrix representations
over finite fields.  Permutation representations are supported to some
extent, too.

%package libs
Summary:        Library of matrix representations over finite fields
Group:          Development/Libraries

%description libs
This package contains the MeatAxe library, which provides functions for
working with matrix representations over finite fields.  Permutation
representations are supported to some extent, too.

%package devel
Summary:        Header files and libraries for MeatAxe development
Group:          Development/Libraries
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

%description devel
This package contains the header files and library links for building
applications that use the MeatAxe library.

%prep
%setup -q -c
%setup -q -T -D -a 1
%patch0

# Set up the configuration
sed -e "s|^MTXLIB=.*|MTXLIB=%{_tmppath}/|" \
    -e "s|^MTXBIN=.*|MTXBIN=%{_libdir}/%{name}/bin|" \
    -e "s|^CFLAGS1=.*|CFLAGS1=-std=gnu99 $RPM_OPT_FLAGS|" \
    Makefile.conf.dist > Makefile.conf

# Let Doxygen find standard header files
sed -ri \
    "s|^(INCLUDE_PATH.*=)|\1 %{_includedir} `echo /usr/lib/gcc/*/*/include`|" \
    etc/Doxyfile

# Let us see compiler warnings
sed -i 's|@\$(CC)|\$(CC)|' Makefile

%build
make %{?_smp_mflags} VERSION=%{version} LFLAGS1="$RPM_LD_FLAGS"
make %{?_smp_mflags} rebuild-doc

%install
# Install the binaries
mkdir -p %{buildroot}%{_libdir}/%{name}/bin
install -m 0755 bin/* -p %{buildroot}%{_libdir}/%{name}/bin
rm -f %{buildroot}%{_libdir}/%{name}/bin/mk.dir

# Install the environment-modules file
mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles
sed 's|@LIBDIR@|'%{_libdir}/%{name}'|' \
  < %{SOURCE2} > %{buildroot}%{_datadir}/Modules/modulefiles/%{name}-%{_arch}

# Install the libraries
cp -dp tmp/libmtx.so* %{buildroot}%{_libdir}
chmod 0755 %{buildroot}%{_libdir}/libmtx.so.%{version}

# Install the header
mkdir -p %{buildroot}%{_includedir}
cp -p src/meataxe.h %{buildroot}%{_includedir}

# Install the man pages
mkdir -p %{buildroot}%{_mandir}/man1
cd man
for m in *.1; do
  sed "s/@VERSION@/%{version}/" $m > %{buildroot}%{_mandir}/man1/$m
  touch -r $m %{buildroot}%{_mandir}/man1/$m
done

%check
make check

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files
%{_datadir}/Modules/modulefiles/%{name}-%{_arch}
%{_libdir}/%{name}/
%{_mandir}/man1/*

%files libs
%doc COPYING README
%{_libdir}/libmtx.so.*

%files devel
%doc doc
%{_includedir}/meataxe.h
%{_libdir}/libmtx.so

%changelog
* Tue May 21 2013 Jerry James <loganjerry@gmail.com> - 2.4.24-5
- Use environment-modules to hide the binaries (bz 962077)
- Use _tmppath for dynamically generated arithmetic tables
- BR doxygen-latex and ghostscript instead of doxygen for better results

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.24-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 28 2012 Jerry James <loganjerry@gmail.com> - 2.4.24-2
- Enable verbose build
- Fix binary and library permissions

* Fri Jan  6 2012 Jerry James <loganjerry@gmail.com> - 2.4.24-1
- Initial RPM