From 71d1817168ed63fdd4f760e0d6709af9a3b4c529 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 8 Feb 2021 07:13:08 -0500 Subject: [PATCH] Build HTML and PDF versions of the documentation into a new -doc subpackage; add Latex2e to License field --- wdiff.spec | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/wdiff.spec b/wdiff.spec index 4439dec..74cdcba 100644 --- a/wdiff.spec +++ b/wdiff.spec @@ -5,7 +5,9 @@ Version: 1.2.2 Release: 18%{?dist} Summary: Compare files on a word per word basis -License: GPLv3+ +# Entire source is GPLv3+, except wdiff.texi and the documentation built from +# it, including info, HTML, and PDF documentation, which is Latex2e. +License: GPLv3+ and Latex2e URL: https://www.gnu.org/software/%{name}/ Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig @@ -22,6 +24,8 @@ BuildRequires: ncurses-devel BuildRequires: help2man BuildRequires: texinfo +BuildRequires: texinfo-tex +BuildRequires: tex(latex) BuildRequires: gnupg2 @@ -55,18 +59,32 @@ rm "${tmp}" %build autoreconf -fiv %configure --enable-experimental="mdiff wdiff2 unify" -%make_build +%make_build all %if %{with rebuild_mans} rm -v man/mdiff.1 man/%{name}.1 man/%{name}2.1 man/unify.1 %make_build -C man mdiff.1 %{name}.1 %{name}2.1 unify.1 %endif +# Make sure we rebuild the info page too. +rm -v doc/%{name}.info +%make_build -C doc info html pdf + %install %make_install -rm '%{buildroot}%{_infodir}/dir' find '%{buildroot}' -type f -name '*gnulib.mo' -print -delete +rm '%{buildroot}%{_infodir}/dir' +install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 \ + ABOUT-NLS \ + AUTHORS \ + BACKLOG \ + ChangeLog \ + NEWS \ + README \ + THANKS \ + TODO +cp -rp doc/%{name}.html %{buildroot}%{_pkgdocdir}/html %find_lang %{name} @@ -78,15 +96,6 @@ find '%{buildroot}' -type f -name '*gnulib.mo' -print -delete %files -f %{name}.lang %license COPYING -%doc ABOUT-NLS -%doc AUTHORS -%doc BACKLOG -%doc ChangeLog -%doc NEWS -%doc README -%doc THANKS -%doc TODO - %{_bindir}/mdiff %{_bindir}/%{name} %{_bindir}/%{name}2 @@ -99,10 +108,14 @@ find '%{buildroot}' -type f -name '*gnulib.mo' -print -delete %{_infodir}/%{name}.info.* +%{_pkgdocdir} + %changelog * Mon Feb 08 2021 Benjamin A. Beasley - 1.2.2-18 - Improve summary and description text +- Build HTML and PDF versions of the documentation +- Add Latex2e to License field * Sun Feb 07 2021 Benjamin A. Beasley - 1.2.2-17 - Change URLs from HTTP to HTTPS