6aeb452
Name:           libtommath
fe1e6ed
Version:        0.42.0
Jaromir Capik 7c95933
Release:        4%{?dist}
c79674a
Summary:        A portable number theoretic multiple-precision integer library
6aeb452
License:        Public Domain
6aeb452
URL:            http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm
077a591
6aeb452
Source0:        http://www.libtom.org/files/ltm-%{version}.tar.bz2
fe1e6ed
Patch0:         %{name}-makefile.patch
077a591
077a591
BuildRequires:  ghostscript
6aeb452
BuildRequires:  libtool
6aeb452
077a591
%if 0%{?rhel} == 6
077a591
BuildRequires:  libtiff
077a591
%else
077a591
BuildRequires:  libtiff-tools
077a591
%endif
077a591
fe1e6ed
%if 0%{?fedora} || 0%{?rhel} >= 7
077a591
BuildRequires:  tex(dvips)
077a591
BuildRequires:  tex(latex)
077a591
%else
077a591
BuildRequires:  tetex-dvips
077a591
BuildRequires:  tetex-latex
077a591
%endif
6aeb452
6aeb452
%description
077a591
A free open source portable number theoretic multiple-precision integer library
077a591
written entirely in C. (phew!). The library is designed to provide a simple to
077a591
work with API that provides fairly efficient routines that build out of the box
077a591
without configuration.
6aeb452
6aeb452
%package        devel
6aeb452
Summary:        Development files for %{name}
fe1e6ed
Requires:       %{name}%{?_isa} = %{version}-%{release}
6aeb452
6aeb452
%description    devel
077a591
The %{name}-devel package contains libraries and header files for developing
077a591
applications that use %{name}.
6aeb452
c79674a
%package        doc
c79674a
Summary:        Documentation files for %{name}
fe1e6ed
BuildArch:      noarch
fe1e6ed
Provides:       %{name}-doc = %{version}-%{release}
fe1e6ed
Obsoletes:      %{name}-doc < 0.42-1
c79674a
c79674a
%description    doc
077a591
The %{name}-doc package contains PDF documentation for using %{name}.
c79674a
6aeb452
%prep
6aeb452
%setup -q
6aeb452
%patch0 -p1 -b .makefile
6aeb452
6aeb452
%build
fe1e6ed
# no configure script ships with libtommath. Its only requirement is ANSI C.
6aeb452
export CFLAGS="$RPM_OPT_FLAGS"
6aeb452
make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared 
Jaromir Capik 7c95933
%ifnarch ppc64le
Jaromir Capik 7c95933
  DOCS="docs"
Jaromir Capik 7c95933
%endif
Jaromir Capik 7c95933
make %{?_smp_mflags} -f makefile poster manual $DOCS
6aeb452
6aeb452
%install
fe1e6ed
# There is no configure script that ships with libtommath but it does understand
fe1e6ed
# DESTDIR and it installs via that and the INSTALL_USER and INSTALL_GROUP
fe1e6ed
# environment variables.
6aeb452
export INSTALL_USER=$(id -un)
6aeb452
export INSTALL_GROUP=$(id -gn)
ec40d2f
make install DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared
519166c
find %{buildroot} -name '*.h' -exec chmod 644 {} \;
519166c
find %{buildroot} -name '*.c' -exec chmod 644 {} \;
54c3dd9
chmod 644 LICENSE
54c3dd9
fe1e6ed
find %{buildroot} -name '*.la' -delete
fe1e6ed
find %{buildroot} -name '*.a' -delete
6aeb452
6aeb452
%post -p /sbin/ldconfig
6aeb452
6aeb452
%postun -p /sbin/ldconfig
6aeb452
6aeb452
%files
6aeb452
%doc LICENSE
6aeb452
%{_libdir}/*.so.*
6aeb452
6aeb452
%files devel
ec40d2f
%{_includedir}/*.h
6aeb452
%{_libdir}/*.so
6aeb452
c79674a
%files doc
c79674a
%doc bn.pdf poster.pdf tommath.pdf
c79674a
6aeb452
%changelog
Jaromir Capik 7c95933
* Mon Dec 07 2015 Jaromir Capik <jcapik@redhat.com> - 0.42.0-4
Jaromir Capik 7c95933
- Workaround for ghostscript segfault on ppc64le
Jaromir Capik 7c95933
ec40d2f
* Sun Sep 29 2013 Simone Caronni <negativo17@gmail.com> - 0.42.0-3
ec40d2f
- Move headers to default location.
ec40d2f
54c3dd9
* Thu Aug 08 2013 Simone Caronni <negativo17@gmail.com> - 0.42.0-2
54c3dd9
- Fix changelog entries.
54c3dd9
- Remove executable bits from LICENSE file and source files.
54c3dd9
54c3dd9
* Thu Aug 08 2013 Simone Caronni <negativo17@gmail.com> - 0.42.0-1
fe1e6ed
- Update to 0.42.
fe1e6ed
- Make doc package noarch and not requiring base package.
fe1e6ed
d93c544
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-17
d93c544
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d93c544
077a591
* Thu Jun 06 2013 Simone Caronni <negativo17@gmail.com> - 0.41-16
077a591
- SPEC file cleanup, remove obsolete tags.
077a591
- Fix tex/latex BuildRequires.
077a591
baefd82
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-15
baefd82
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
baefd82
1cb4069
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-14
1cb4069
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1cb4069
e6e873a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-13
e6e873a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e6e873a
1e8b8c8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-12
1e8b8c8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1e8b8c8
01233f1
* Sun Jun 20 2010 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.41-11
01233f1
- fix bugs #555445 and #591543
01233f1
4168481
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-10
4168481
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4168481
9f18aa2
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-9
9f18aa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9f18aa2
e6cf5b2
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.41-8
e6cf5b2
- Autorebuild for GCC 4.3
e6cf5b2
c79674a
* Sun Nov 25 2007 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.41-7
c79674a
- Resolve multilib conflicts from Bug #342441 by splitting out
c79674a
  documentation to libtommath-docs subpackage
c79674a
- fix rpmlint Summary: warning
c79674a
8cfb22c
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.41-6
8cfb22c
- Rebuild for selinux ppc32 issue.
8cfb22c
6aeb452
* Fri Jun 29 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.41-5
6aeb452
- removed package name from summary
6aeb452
 
6aeb452
* Wed Jun 27 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.41-4
6aeb452
- changed patch to honor RPM_OPT_FLAGS
6aeb452
- changed patch to allow INCPATH to be set externally
6aeb452
- changed installation of headers to _includedir/tommath
6aeb452
6aeb452
* Sun Jun 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.41-3
6aeb452
- changed patch to bring it into line with the style of libtomcrypt 
6aeb452
6aeb452
* Sat Jun 23 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.41-2
6aeb452
- add patch to makefile.shared to allow for /usr/lib64 installs
6aeb452
- update spec to pass libdir build and install process
6aeb452
6aeb452
* Fri Jun 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.41-1
6aeb452
- Initial spec file creation