#3 don't generate PDF build time
Merged 5 years ago by spot. Opened 5 years ago by praiskup.
rpms/ praiskup/libconfig master  into  master

file modified
+1 -1
@@ -1,2 +1,2 @@ 

- /libconfig.pdf

+ /libconfig-1.7.2.pdf

  /libconfig-1.7.2.tar.gz

file added
+30
@@ -0,0 +1,30 @@ 

+ #! /bin/sh

+ 

+ # This script builds the PDF version of the libconfig documentation.

+ # Inspired by the PostgreSQL package.

+ 

+ set -e

+ 

+ # Pass package version and name optionally as argument

+ VERSION=$1

+ PKGNAME=${2-libconfig}

+ 

+ test -z "$VERSION" && VERSION=`awk '/^Version:/ { print $2; }' "$PKGNAME".spec`

+ 

+ TARGETFILE=`readlink -f "$PKGNAME-$VERSION.pdf"`

+ test -f "$TARGETFILE" && echo "$TARGETFILE exists" && exit 1

+ 

+ echo Building $TARGETFILE ...

+ 

+ tar xf "$PKGNAME"-$VERSION.tar.*

+ cd "$PKGNAME"-$VERSION

+ 

+ # Apply any patches that affect the PDF documentation

+ # patch -p1 < ../xxx.patch

+ 

+ # Build the PDF docs

+ ./configure >/dev/null

+ make pdf

+ mv -f doc/libconfig.pdf "$TARGETFILE"

+ 

+ exit 0

file modified
+4 -5
@@ -8,10 +8,12 @@ 

  URL:                    http://www.hyperrealm.com/libconfig/

  Source0:                https://hyperrealm.github.io/%name/dist/%name-%version.tar.gz

  # Generated from libconfig 1.7.2 on Fedora 28 x86_64 (2018-07-18)

- Source1:                libconfig.pdf

+ Source1:                libconfig-%version.pdf

+ # Helper script to generate Source1 (locally)

+ Source2:                generate-pdf.sh

  

  BuildRequires:          gcc, gcc-c++

- BuildRequires:          texinfo-tex, tex(ecbx1095.tfm), tex(ecrm1095.tfm), tex(cm-super-t1.enc)

+ BuildRequires:          texinfo

  BuildRequires:          bison, flex

  

  %description
@@ -42,15 +44,12 @@ 

    --disable-static

  

  make %{?_smp_mflags}

- make pdf

  

  

  %install

  %make_install

  rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la

  rm -rf $RPM_BUILD_ROOT%{_infodir}/dir

- # Need to use a pre-built copy to support multilib

- rm -rf doc/libconfig.pdf

  install -p %{SOURCE1} doc/

  

  

file modified
+1 -1
@@ -1,2 +1,2 @@ 

  SHA512 (libconfig-1.7.2.tar.gz) = b0fcc403325fde217bd6509f10e8458958c8a93ff0a400da2602d62b7873e87f43ee6f1763ba30b3316e35a282a766c781a94b4d021b8c7e6ae2cf2cf108dd84

- SHA512 (libconfig.pdf) = d956be4f0300a1a1343694f1d2ef0943318455940de44f77347619583f1d3077c7dd12609b95a5f4b9fc4068067b492a48e743bd706f17da7381f8122400e8b6

+ SHA512 (libconfig-1.7.2.pdf) = d956be4f0300a1a1343694f1d2ef0943318455940de44f77347619583f1d3077c7dd12609b95a5f4b9fc4068067b492a48e743bd706f17da7381f8122400e8b6

That only creates additional build requirements, wastes some time
and the final PDF is not used anyways.

rebased onto 1302abc

5 years ago

rebased onto 78fc2cb

5 years ago

Please include the generation script as a Source file, so that others can reproduce this.

rebased onto 16c3be8

5 years ago

rebased onto a6d80de

5 years ago

Pull-Request has been merged by spot

5 years ago