summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Raudsepp2011-05-02 22:09:04 +0300
committerMarti Raudsepp2011-05-02 22:09:04 +0300
commitdd791037cc80c7dcd7eb8cd42db5bf06af26ceb5 (patch)
treee21062c0f07fbde699f5bbdebc59ecdb1eb41a0b
downloadaur-dd791037cc80c7dcd7eb8cd42db5bf06af26ceb5.tar.gz
postgresql-beta: Copy of postgresql-testing
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD44
-rw-r--r--postgresql.confd4
-rw-r--r--postgresql.pam3
-rw-r--r--postgresql.rc59
5 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ba21ae6d2ddd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = postgresql-beta
+ pkgdesc = Beta version of the PostgreSQL database (includes both server and libs)
+ pkgver = 9.1beta3
+ pkgrel = 1
+ url = http://www.postgresql.org/developer/alpha
+ arch = i686
+ arch = x86_64
+ license = custom:PostgreSQL
+ makedepends = python2
+ makedepends = perl
+ depends = libxml2
+ depends = readline>=6.0
+ depends = openssl
+ depends = bash
+ provides = postgresql-libs=9.1beta3
+ provides = postgresql=9.1beta3
+ conflicts = postgresql-libs
+ conflicts = postgresql
+ options = !strip
+ backup = etc/conf.d/postgresql
+ backup = etc/pam.d/postgresql
+ source = http://ftp.de.postgresql.org/packages/databases/PostgreSQL/source/v9.1beta3/postgresql-9.1beta3.tar.bz2
+ source = postgresql.rc
+ source = postgresql.confd
+ source = postgresql.pam
+ md5sums = b40a59b229750505152c8f07caf30137
+ md5sums = 86e0161343ce80e544aba999f284bc88
+ md5sums = df6ddf9e2ab4700a3415f17c0f4f4172
+ md5sums = 96f82c38f3f540b53f3e5144900acf17
+
+pkgname = postgresql-beta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9e792ad38459
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Marti Raudsepp <marti@juffo.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=postgresql-beta
+pkgver=9.1beta1
+pkgrel=1
+pkgdesc="Beta version of the PostgreSQL database (includes both server and libs)"
+arch=(i686 x86_64)
+license=('custom:PostgreSQL')
+backup=('etc/conf.d/postgresql' 'etc/pam.d/postgresql')
+url="http://www.postgresql.org/developer/alpha"
+options=(!strip) # to facilitate debugging of testing builds
+depends=('libxml2' 'readline>=6.0' 'openssl' 'bash')
+makedepends=('python2' 'perl')
+conflicts=('postgresql-libs' 'postgresql')
+provides=("postgresql-libs=$pkgver" "postgresql=$pkgver")
+source=(http://ftp.de.postgresql.org/packages/databases/PostgreSQL/source/v$pkgver/postgresql-$pkgver.tar.bz2
+ postgresql.rc postgresql.confd postgresql.pam)
+
+build() {
+ cd $srcdir/postgresql-$pkgver
+
+ ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \
+ --with-openssl --with-perl \
+ --with-python PYTHON=/usr/bin/python2 --with-pam \
+ --with-system-tzdata=/usr/share/zoneinfo --enable-nls \
+ --datadir=/usr/share/postgresql --enable-thread-safety
+
+ make
+ make DESTDIR=$pkgdir install
+
+ # build all contrib modules
+ make -C contrib
+ make -C contrib DESTDIR=$pkgdir install
+
+ install -D -m755 $srcdir/postgresql.rc $pkgdir/etc/rc.d/postgresql
+ install -D -m644 COPYRIGHT $pkgdir/usr/share/licenses/$pkgname/LICENSE
+ install -D -m644 $srcdir/postgresql.confd $pkgdir/etc/conf.d/postgresql
+ install -D -m644 $srcdir/postgresql.pam $pkgdir/etc/pam.d/postgresql
+}
+md5sums=('3c48bf29e0d4acfecec9fdf50ca193d1'
+ '86e0161343ce80e544aba999f284bc88'
+ 'df6ddf9e2ab4700a3415f17c0f4f4172'
+ '96f82c38f3f540b53f3e5144900acf17')
diff --git a/postgresql.confd b/postgresql.confd
new file mode 100644
index 000000000000..7bbf0160316a
--- /dev/null
+++ b/postgresql.confd
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to postgresql
+#
+PGROOT="/var/lib/postgres" \ No newline at end of file
diff --git a/postgresql.pam b/postgresql.pam
new file mode 100644
index 000000000000..53724d1f86a7
--- /dev/null
+++ b/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/postgresql.rc b/postgresql.rc
new file mode 100644
index 000000000000..ea5727c30059
--- /dev/null
+++ b/postgresql.rc
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/postgresql
+
+case "$1" in
+ start)
+ stat_busy "Starting PostgreSQL"
+ # initialization
+ if [ ! `egrep '^postgres:' /etc/group` ]; then
+ stat_busy "Adding postgres group"
+ groupadd -g 88 postgres
+ stat_done
+ fi
+ if [ ! `egrep '^postgres:' /etc/passwd` ]; then
+ stat_busy "Adding postgres user"
+ useradd -u 88 -g postgres -d $PGROOT -s /bin/bash postgres
+ [ -d $PGROOT ] && chown -R postgres.postgres $PGROOT
+ stat_done
+ fi
+ if [ ! -d $PGROOT ]; then
+ mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data
+ su - postgres -c "/usr/bin/initdb -D $PGROOT/data --locale $LOCALE"
+ fi
+ if [ ! -e /var/log/postgresql.log ]; then
+ touch /var/log/postgresql.log
+ chown postgres /var/log/postgresql.log
+ fi
+ # start the process
+ su - postgres -c \
+ "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -W start"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon postgresql
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping PostgreSQL"
+ su - postgres -c \
+ "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -w stop"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon postgresql
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0