Document how to generate PDF doc file.

This commit is contained in:
Tom Lane 2010-01-16 05:40:31 +00:00
parent 8c0b311010
commit 8d21c7a170
2 changed files with 49 additions and 2 deletions

46
generate-pdf.sh Executable file
View File

@ -0,0 +1,46 @@
#! /bin/sh
# This script builds the PDF version of the PostgreSQL documentation.
#
# In principle we could do this as part of the RPM build, but there are
# good reasons not to:
# 1. The build would take longer and have a larger BuildRequires footprint.
# 2. The generated PDF has timestamps in it, which would inevitably result
# in multilib conflicts due to slightly different timestamps.
# So instead, we run this manually when rebasing to a new upstream release,
# and treat the resulting PDF as a separate Source file.
#
# You will need to have the docbook packages installed to run this.
# Expect it to take about 20 minutes and use about 160MB of disk.
# Extract version from specfile
VERSION=`sed -n 's/^Version: //p' postgresql.spec`
TARGETFILE=postgresql-$VERSION-US.pdf
echo Building $TARGETFILE ...
# Unpack and configure postgresql
tar xfj postgresql-$VERSION.tar.bz2 || exit 1
cd postgresql-$VERSION || exit 1
./configure >/dev/null || exit 1
# Build the PDF docs
cd doc/src/sgml
make postgres-US.pdf >make.log || exit 1
mv -f postgres-US.pdf ../../../../$TARGETFILE
# Clean up
cd ../../../..
rm -rf postgresql-$VERSION
exit 0

View File

@ -61,6 +61,8 @@ Group: Applications/Databases
Url: http://www.postgresql.org/
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
# The PDF file is generated by generate-pdf.sh, which see for comments
Source1: postgresql-%{version}-US.pdf
Source3: postgresql.init
Source4: Makefile.regress
Source5: pg_config.h
@ -69,7 +71,6 @@ Source7: ecpg_config.h
Source14: postgresql.pam
Source15: postgresql-bashprofile
Source16: filter-requires-perl-Pg.sh
Source17: http://www.postgresql.org/docs/manuals/postgresql-8.4.2-US.pdf
Patch1: rpm-pgsql.patch
Patch2: postgresql-ac-version.patch
@ -278,7 +279,7 @@ system, including regression tests and benchmarks.
autoconf
cp -p %{SOURCE17} .
cp -p %{SOURCE1} .
%build