From d33d5c4cf17de4ed7e06a2e2f184dc30a6f473ba Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 4 Feb 2021 08:24:04 -0500 Subject: [PATCH] Build HTML and PDF versions of documentation; rebuld the info pages; and move it all to a -doc subpackage with the text file documentation (README, etc.) --- libIDL.spec | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/libIDL.spec b/libIDL.spec index 3168ca7..d31dedf 100644 --- a/libIDL.spec +++ b/libIDL.spec @@ -48,6 +48,10 @@ BuildRequires: glib2-devel BuildRequires: flex BuildRequires: bison +BuildRequires: texinfo +BuildRequires: texinfo-tex +BuildRequires: tex(latex) + %global common_description %{expand: %{name} is a library for parsing IDL (Interface Definition Language). It can be used for both COM-style and CORBA-style IDL.} @@ -67,28 +71,46 @@ This package contains the header files and libraries needed to write or compile programs that use %{name}. +%package doc +Summary: Documentation for %{name} +BuildArch: noarch + +%description doc %{common_description} + +This page contains info pages and HTML and PDF documentation for %{name}. + + %prep %autosetup -p1 %build %configure --disable-static -%make_build +# We re-generate the info page, and also build PDF and HTML docs from the +# texinfo source. +rm %{name}2.info +%make_build all %{name}2.info %{name}2.html %{name}2.pdf %install %make_install -rm '%{buildroot}%{_infodir}/dir' rm '%{buildroot}%{_libdir}/%{name}-2.la' +rm '%{buildroot}%{_infodir}/dir' +install -d '%{buildroot}%{_pkgdocdir}' +install -t '%{buildroot}%{_pkgdocdir}' -p -m 0644 \ + AUTHORS \ + BUGS \ + ChangeLog \ + COPYING \ + HACKING \ + MAINTAINERS \ + NEWS \ + README \ + %{name}2.pdf +cp -rp '%{name}2.html' '%{buildroot}%{_pkgdocdir}/html' %files -%doc AUTHORS -%doc COPYING -%doc README -%doc NEWS -%doc BUGS -%doc MAINTAINERS %{_libdir}/%{name}-2.so.%{so_version} %{_libdir}/%{name}-2.so.%{so_version}.* @@ -102,8 +124,12 @@ rm '%{buildroot}%{_libdir}/%{name}-2.la' %{_libdir}/pkgconfig/%{name}-2.0.pc %{_bindir}/%{name}-config-2 + +%files doc %{_infodir}/%{name}2.info* +%{_pkgdocdir} + %changelog * Wed Feb 03 2021 Benjamin A. Beasley - 0.8.14-24 @@ -117,6 +143,8 @@ rm '%{buildroot}%{_libdir}/%{name}-2.la' - Use %%name macro - Add well-considered patches for all compiler warnings - Drop explicitly versioned dependencies per Fedora guidelines +- Build HTML and PDF versions of documentation; rebuld the info pages; and move + it all to a -doc subpackage with the text file documentation (README, etc.) * Tue Jan 26 2021 Fedora Release Engineering - 0.8.14-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild