Blame SOURCES/generate-pdf.sh

827358
#! /bin/sh
827358
827358
# This script builds the PDF version of the PostgreSQL documentation.
827358
#
827358
# In principle we could do this as part of the RPM build, but there are
827358
# good reasons not to:
827358
# 1. The build would take longer and have a larger BuildRequires footprint.
827358
# 2. The generated PDF has timestamps in it, which would inevitably result
827358
#    in multilib conflicts due to slightly different timestamps.
827358
# So instead, we run this manually when rebasing to a new upstream release,
827358
# and treat the resulting PDF as a separate Source file.
827358
#
827358
# You will need to have the docbook packages installed to run this.
827358
# Expect it to take about 20 minutes and use about 160MB of disk.
827358
827358
set -e
827358
827358
# Pass package version (e.g., 9.1.2) as argument
827358
VERSION=$1
827358
827358
TARGETFILE=postgresql-$VERSION-US.pdf
827358
827358
echo Building $TARGETFILE ...
827358
827358
# Unpack postgresql
827358
827358
rm -rf postgresql-$VERSION
827358
827358
tar xfj postgresql-$VERSION.tar.bz2
827358
827358
cd postgresql-$VERSION
827358
827358
# Apply any patches that affect the PDF documentation
827358
827358
# patch -p1 < ../postgresql-multi-sockets.patch
827358
827358
# Configure ...
827358
827358
./configure >/dev/null
827358
827358
# Build the PDF docs
827358
827358
cd doc/src/sgml
827358
827358
make postgres-US.pdf >make.log
827358
827358
mv -f postgres-US.pdf ../../../../$TARGETFILE
827358
827358
# Clean up
827358
827358
cd ../../../..
827358
827358
rm -rf postgresql-$VERSION
827358
827358
exit 0