rpms/postgresql/devel generate-pdf.sh, NONE, 1.1 postgresql.spec, 1.126, 1.127

Tom Lane tgl at fedoraproject.org
Sat Jan 16 05:40:31 UTC 2010


Author: tgl

Update of /cvs/pkgs/rpms/postgresql/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27375

Modified Files:
	postgresql.spec 
Added Files:
	generate-pdf.sh 
Log Message:
Document how to generate PDF doc file.


--- NEW FILE generate-pdf.sh ---
#! /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


Index: postgresql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/devel/postgresql.spec,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -p -r1.126 -r1.127
--- postgresql.spec	11 Jan 2010 18:11:25 -0000	1.126
+++ postgresql.spec	16 Jan 2010 05:40:31 -0000	1.127
@@ -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 b
 
 autoconf
 
-cp -p %{SOURCE17} .
+cp -p %{SOURCE1} .
 
 %build
 



More information about the scm-commits mailing list