don't generate PDF build time
That only creates additional build requirements, wastes some time and the final PDF is not used anyways. Also note that the pdf was renamed to %name-%version.pdf to ensure that the PDF is always re-generated after version update. Version: 1.7.2-2
This commit is contained in:
parent
f8828aa23c
commit
a6d80dec86
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/libconfig.pdf
|
||||
/libconfig-1.7.2.pdf
|
||||
/libconfig-1.7.2.tar.gz
|
||||
|
||||
30
generate-pdf.sh
Executable file
30
generate-pdf.sh
Executable file
@ -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
|
||||
@ -8,10 +8,12 @@ License: LGPLv2+
|
||||
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 @@ mv AUTHORS{.utf8,}
|
||||
--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/
|
||||
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (libconfig-1.7.2.tar.gz) = b0fcc403325fde217bd6509f10e8458958c8a93ff0a400da2602d62b7873e87f43ee6f1763ba30b3316e35a282a766c781a94b4d021b8c7e6ae2cf2cf108dd84
|
||||
SHA512 (libconfig.pdf) = d956be4f0300a1a1343694f1d2ef0943318455940de44f77347619583f1d3077c7dd12609b95a5f4b9fc4068067b492a48e743bd706f17da7381f8122400e8b6
|
||||
SHA512 (libconfig-1.7.2.pdf) = d956be4f0300a1a1343694f1d2ef0943318455940de44f77347619583f1d3077c7dd12609b95a5f4b9fc4068067b492a48e743bd706f17da7381f8122400e8b6
|
||||
|
||||
Loading…
Reference in New Issue
Block a user