From 5ed5212649823b124f85c57b84e105c912d9392c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 16 Oct 2019 20:36:47 +0200 Subject: [PATCH] Do not build documentation on RHEL/CentOS --- libtomcrypt.spec | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/libtomcrypt.spec b/libtomcrypt.spec index 0e93000..adb7ff2 100644 --- a/libtomcrypt.spec +++ b/libtomcrypt.spec @@ -1,24 +1,29 @@ +%if 0%{?fedora} +%global _with_docs 1 +%endif + Name: libtomcrypt Version: 1.18.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A comprehensive, portable cryptographic toolkit License: Public Domain or WTFPL URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ghostscript BuildRequires: libtommath-devel >= 1.0 BuildRequires: libtool + +%{?_with_docs: +BuildRequires: ghostscript BuildRequires: texlive-latex-bin-bin BuildRequires: texlive-makeindex-bin BuildRequires: texlive-mfware-bin BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) -%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: tex(mf.mf) -%endif +} %description A comprehensive, modular and portable cryptographic toolkit that provides @@ -39,15 +44,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%{?_with_docs: %package doc Summary: Documentation files for %{name} BuildArch: noarch Provides: %{name}-doc = %{version}-%{release} Obsoletes: %{name}-doc < 1.17-19 - %description doc The %{name}-doc package contains documentation for use with %{name}. +} %prep %setup -q @@ -60,8 +66,10 @@ export LIBPATH="%{_libdir}" export EXTRALIBS="-ltommath" export CFLAGS="%{build_cflags} -DLTM_DESC -DUSE_LTM" %make_build V=1 -f makefile.shared library -%make_build V=1 -f makefile docs %make_build V=1 -f makefile.shared test +%{?_with_docs: +%make_build V=1 -f makefile docs +} %check ./test @@ -90,10 +98,15 @@ sed -i \ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%{?_with_docs: %files doc %doc doc/crypt.pdf +} %changelog +* Wed Oct 16 2019 Simone Caronni - 1.18.2-5 +- Do not build documentation on RHEL/CentOS. + * Thu Jul 25 2019 Fedora Release Engineering - 1.18.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild