From 25d7dd7745baf2ffb5907491412f93ce6fe3b5d2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 25 Feb 2020 14:40:48 +0100 Subject: [PATCH] Exclude doc package from flatpak build The problem is that the BuildRequires ghostscript.spec in turn has a Requires: %{_bindir}/dvips which would expand to non-existent /app/bin/dvips when libtommath is built as a flatpak (as a dependency of building libreoffice as a flatpak), which would break the build. The easiest fix appears to be to just not build docs for the flatpak case. --- libtommath.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 45208f3..375c828 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -7,9 +7,11 @@ URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildRequires: libtool + +%if ! 0%{?flatpak} BuildRequires: ghostscript BuildRequires: libtiff-tools -BuildRequires: libtool BuildRequires: texlive-dvips-bin BuildRequires: ghostscript-tools-dvipdf BuildRequires: texlive-latex-bin-bin @@ -19,6 +21,7 @@ BuildRequires: texlive-updmap-map BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) +%endif %description A free open source portable number theoretic multiple-precision integer library @@ -34,6 +37,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%if ! 0%{?flatpak} %package doc Summary: Documentation files for %{name} BuildArch: noarch @@ -42,6 +46,7 @@ Obsoletes: %{name}-doc < 0.42-1 %description doc The %{name}-doc package contains PDF documentation for using %{name}. +%endif %prep %setup -q @@ -56,7 +61,9 @@ sed -i \ %build %set_build_flags %make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared +%if ! 0%{?flatpak} make V=1 -f makefile poster manual docs +%endif %install %make_install V=1 CFLAGS="$CFLAGS -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared @@ -75,8 +82,10 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%if ! 0%{?flatpak} %files doc %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf +%endif %changelog * Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2