summaryrefslogtreecommitdiff
path: root/extra/postgresql
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-02-29 03:34:34 +0000
committerroot <root@rshg054.dnsready.net>2012-02-29 03:34:34 +0000
commit32b05a621cb20af1bd4b7cd6f5609b7512bb20f1 (patch)
tree60ba7e9c94b5ea69643a2022cd2ff890958da0f9 /extra/postgresql
parent1f567a9d58d16b76320168f0624aa55bd6320284 (diff)
Wed Feb 29 03:34:34 UTC 2012
Diffstat (limited to 'extra/postgresql')
-rw-r--r--extra/postgresql/PKGBUILD39
-rwxr-xr-xextra/postgresql/postgresql.rcd79
2 files changed, 107 insertions, 11 deletions
diff --git a/extra/postgresql/PKGBUILD b/extra/postgresql/PKGBUILD
index 302e0a967..b9e57d230 100644
--- a/extra/postgresql/PKGBUILD
+++ b/extra/postgresql/PKGBUILD
@@ -1,26 +1,32 @@
-# $Id: PKGBUILD 144443 2011-12-05 21:09:28Z dan $
+# $Id: PKGBUILD 151563 2012-02-27 18:02:25Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>
pkgbase=postgresql
pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql')
-pkgver=9.1.2
+pkgver=9.1.3
_majorver=${pkgver%.*}
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.postgresql.org/"
license=('custom:PostgreSQL')
-makedepends=('libxml2' 'python2' 'perl' 'openssl>=1.0.0')
+makedepends=('libxml2' 'python2' 'perl' 'tcl' 'openssl>=1.0.0')
source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
- postgresql postgresql.confd postgresql.pam postgresql.logrotate)
+ postgresql.rcd postgresql.confd postgresql.pam postgresql.logrotate)
build() {
cd "${srcdir}/postgresql-${pkgver}"
- ./configure --prefix=/usr --mandir=/usr/share/man \
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
--datadir=/usr/share/postgresql \
- --with-libxml --with-openssl --with-perl \
- --with-python PYTHON=/usr/bin/python2 --with-pam \
- --with-system-tzdata=/usr/share/zoneinfo --enable-nls \
+ --with-libxml \
+ --with-openssl \
+ --with-perl \
+ --with-python PYTHON=/usr/bin/python2 \
+ --with-tcl \
+ --with-pam \
+ --with-system-tzdata=/usr/share/zoneinfo \
+ --enable-nls \
--enable-thread-safety
make world
@@ -86,6 +92,7 @@ package_postgresql() {
depends=("postgresql-libs>=${pkgver}" 'libxml2' 'readline>=6.0' 'openssl>=1.0.0')
optdepends=('python2: for PL/Python support'
'perl: for PL/Perl support'
+ 'tcl: for PL/Tcl support'
'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade')
install=postgresql.install
@@ -113,7 +120,7 @@ package_postgresql() {
rmdir "${pkgdir}/usr/share/doc/postgresql/html"
# install launch script
- install -D -m755 "${srcdir}/postgresql" "${pkgdir}/etc/rc.d/postgresql"
+ install -D -m755 "${srcdir}/postgresql.rcd" "${pkgdir}/etc/rc.d/postgresql"
# install conf file
install -D -m644 ${srcdir}/postgresql.confd \
@@ -127,12 +134,22 @@ package_postgresql() {
}
md5sums=('7dbff52221954c46595313eb7f92c3e0'
- '4a6e9b63f2aa50195735f2b46aba040b'
+ '1ddd1df8010549f237e7983bb326025e'
'a54d09a20ab1672adf08f037df188d53'
'96f82c38f3f540b53f3e5144900acf17'
'd28e443f9f65a5712c52018b84e27137')
sha256sums=('8d54ff514f5b2754e6e36b008c43d7bbf7daf541da608767cc5bdedb1de5db30'
- 'b2931d7a719e765f14811b9109310b2418d3064bfcedef699573fc25854a2201'
+ '9f6307b1358892e304f9474a456f0cb9160cfb8812a9da0430abe647f8a9cf45'
+ '3de5c059eead8816db15c2c5588e6196d6c4b0d704faf1a20912796cf589ba81'
+ '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
+ '6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e')
+md5sums=('641e1915f7ebfdc9f138e4c55b6aec0e'
+ '1ddd1df8010549f237e7983bb326025e'
+ 'a54d09a20ab1672adf08f037df188d53'
+ '96f82c38f3f540b53f3e5144900acf17'
+ 'd28e443f9f65a5712c52018b84e27137')
+sha256sums=('7a79800a624031c1d9bc9cdce73cb40050100ac50a82050cbf7bbbd16ac4d5d5'
+ '9f6307b1358892e304f9474a456f0cb9160cfb8812a9da0430abe647f8a9cf45'
'3de5c059eead8816db15c2c5588e6196d6c4b0d704faf1a20912796cf589ba81'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e')
diff --git a/extra/postgresql/postgresql.rcd b/extra/postgresql/postgresql.rcd
new file mode 100755
index 000000000..f3600b30b
--- /dev/null
+++ b/extra/postgresql/postgresql.rcd
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/postgresql
+
+# Default PGROOT if it wasn't defined in the conf.d file
+PGROOT=${PGROOT:-/var/lib/postgres}
+PGLOG=${PGLOG:-/var/log/postgresql.log}
+PGCTL_BIN=/usr/bin/pg_ctl
+PGCTL_ARGS=(-D "$PGROOT/data" -l "$PGLOG" -s -w)
+[[ $PGOPTS ]] && PGCTL_ARGS+=(-o "$PGOPTS")
+
+postgres_init() {
+ # initialization
+ if [[ ! -d "$PGROOT/data" ]]; then
+ mkdir -p "$PGROOT/data" && chown -R postgres:postgres "$PGROOT"
+ su - postgres -c "/usr/bin/initdb $INITOPTS -D '$PGROOT/data'"
+ fi
+ if [[ ! -e "$PGLOG" ]]; then
+ touch "$PGLOG"
+ chown postgres "$PGLOG"
+ fi
+}
+
+do_postgres() {
+ su - postgres -c "'$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}" "$@")"
+}
+
+case $1 in
+ start)
+ postgres_init
+ stat_busy "Starting PostgreSQL"
+ if do_postgres start; then
+ add_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping PostgreSQL"
+ if do_postgres stop -m fast; then
+ rm_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ reload)
+ stat_busy "Reloading PostgreSQL"
+ if do_postgres reload; then
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ restart)
+ postgres_init
+ stat_busy "Restarting PostgreSQL"
+ if do_postgres restart -m fast; then
+ add_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ status)
+ stat_busy "Checking PostgreSQL status";
+ ck_status postgresql
+ ;;
+ *)
+ echo "usage: $0 {start|stop|reload|restart|status}"
+ exit 1
+esac