From e3608897b8edb18401d02498742b23310584a0e7 Mon Sep 17 00:00:00 2001
From: Nagy Karoly Gabriel <karasz@opensde.org>
Date: Fri, 23 Nov 2007 09:40:09 +0200
Subject: [PATCH] Added pg_filedump (8.2) - A PostgerSQL utility

moved from WIP to final location ;-)
---
 database/pg_filedump/make_patch.diff         | 26 ++++++++++++++
 database/pg_filedump/pg_filedump.conf        | 17 +++++++++
 database/pg_filedump/pg_filedump.desc        | 36 ++++++++++++++++++++
 database/pg_filedump/pkg_postgresql_pre.conf | 25 ++++++++++++++
 4 files changed, 104 insertions(+)
 create mode 100644 database/pg_filedump/make_patch.diff
 create mode 100644 database/pg_filedump/pg_filedump.conf
 create mode 100644 database/pg_filedump/pg_filedump.desc
 create mode 100644 database/pg_filedump/pkg_postgresql_pre.conf

diff --git a/database/pg_filedump/make_patch.diff b/database/pg_filedump/make_patch.diff
new file mode 100644
index 000000000..03f0c6818
--- /dev/null
+++ b/database/pg_filedump/make_patch.diff
@@ -0,0 +1,26 @@
+# --- SDE-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# 
+# Filename: package/.../pg_filedump/make_patch.diff
+# Copyright (C) 2007 The OpenSDE Project
+# 
+# More information can be found in the files COPYING and README.
+# 
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- SDE-COPYRIGHT-NOTE-END ---
+
+--- ./contrib/Makefile.orig	2007-11-22 17:32:55.000000000 +0200
++++ ./contrib/Makefile	2007-11-22 17:34:04.000000000 +0200
+@@ -22,6 +22,7 @@
+ 		pg_buffercache	\
+ 		pg_freespacemap \
+ 		pg_trgm		\
++		pg_filedump-8.2	\
+ 		pgbench		\
+ 		pgcrypto	\
+ 		pgrowlocks	\
diff --git a/database/pg_filedump/pg_filedump.conf b/database/pg_filedump/pg_filedump.conf
new file mode 100644
index 000000000..ba569e0d2
--- /dev/null
+++ b/database/pg_filedump/pg_filedump.conf
@@ -0,0 +1,17 @@
+# --- SDE-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# 
+# Filename: package/.../pg_filedump/pg_filedump.conf
+# Copyright (C) 2007 The OpenSDE Project
+# 
+# More information can be found in the files COPYING and README.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License. A copy of the
+# GNU General Public License can be found in the file COPYING.
+# --- SDE-COPYRIGHT-NOTE-END ---
+
+makeopt=""
+makeinstopt="" 
+custmain="true"
diff --git a/database/pg_filedump/pg_filedump.desc b/database/pg_filedump/pg_filedump.desc
new file mode 100644
index 000000000..86fad93d5
--- /dev/null
+++ b/database/pg_filedump/pg_filedump.desc
@@ -0,0 +1,36 @@
+[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
+[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+[COPY] 
+[COPY] Filename: package/.../pg_filedump/pg_filedump.desc
+[COPY] Copyright (C) 2007 The OpenSDE Project
+[COPY] 
+[COPY] More information can be found in the files COPYING and README.
+[COPY] 
+[COPY] This program is free software; you can redistribute it and/or modify
+[COPY] it under the terms of the GNU General Public License as published by
+[COPY] the Free Software Foundation; version 2 of the License. A copy of the
+[COPY] GNU General Public License can be found in the file COPYING.
+[COPY] --- SDE-COPYRIGHT-NOTE-END ---
+
+
+[I] A PostgerSQL utility
+
+[T] An utility to format PostgreSQL heap/index/control files
+[T] into a human-readable form. Can format/dump the files several ways,
+[T] as listed in the Invocation section, as well as dumping straight binary. 
+[T] Forensics utility, not for the faint of heart ones.
+
+[U] http://sources.redhat.com/rhdb/index.html 
+
+[A] The RHDB team {http://sources.redhat.com/rhdb/who.html}
+[M] Nagy Karoly Gabriel <karasz@opensde.org>
+
+[C] extra/database
+
+[L] GPL
+[S] Stable
+[V] 8.2
+[P] X -----5---9 125.000
+
+[D] 3781126080 pg_filedump-8.2.tar http://sources.redhat.com/rhdb/tools/
+
diff --git a/database/pg_filedump/pkg_postgresql_pre.conf b/database/pg_filedump/pkg_postgresql_pre.conf
new file mode 100644
index 000000000..1ab782581
--- /dev/null
+++ b/database/pg_filedump/pkg_postgresql_pre.conf
@@ -0,0 +1,25 @@
+# --- SDE-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# 
+# Filename: package/.../pg_filedump/pkg_postgresql_pre.conf
+# Copyright (C) 2007 The OpenSDE Project
+# 
+# More information can be found in the files COPYING and README.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License. A copy of the
+# GNU General Public License can be found in the file COPYING.
+# --- SDE-COPYRIGHT-NOTE-END ---
+
+pg_dmp_ver=$( pkgdesc ver pg_filedump )
+echo_status "Including PG_FileDump (${pg_dmp_ver}) support."
+
+var_append patchfiles " " "${base}/package/*/pg_filedump/make_patch.diff"
+
+hook_add preconf 5 'pg_filedump_extract'
+pg_filedump_extract() {
+        tar -v $taropt $( match_source_file -p pg_filedump pg_filedump ) -C $builddir/postgresql-$ver/contrib
+	rm -rf $builddir/postgresql-$ver/contrib/pg_filedump-$pg_dmp_ver/Makefile
+	mv $builddir/postgresql-$ver/contrib/pg_filedump-$pg_dmp_ver/Makefile{.contrib,}
+}