postgresql: update to 9.3.5.

This commit is contained in:
Christian Neukirchen 2014-10-04 17:39:40 +02:00
parent ec585230df
commit 99fc9c864b
5 changed files with 59 additions and 7 deletions

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -p daemon.info -t postgres

View File

@ -0,0 +1 @@
/run/runit/supervise.postgresql-log

View File

@ -0,0 +1,30 @@
#!/bin/sh
. /etc/default/postgresql
: ${PGDATA:="$PGROOT/data"}
if [ "$PGROOT" != "/var/lib/postgresql" ]; then
echo "Creating symlink /var/lib/postgresql -> $PGROOT"
# Remove /var/lib/postgres if empty dir, but not if symlink
if [ ! -L /var/lib/postgres ] && [ -d /var/lib/postgres ]; then
rmdir /var/lib/postgres
fi
ln -sf "$PGROOT" /var/lib/postgresql
fi
if [ ! -d "$PGDATA" ]; then
echo "Initializing database in $PGDATA"
mkdir -p "$PGDATA"
chown -R postgres:postgres "$PGDATA"
su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null
if [ -f /etc/postgresql/postgresql.conf ]; then
ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
fi
fi
exec chpst -u postgres:postgres postgres -D "$PGDATA" $PGOPTS 2>&1

View File

@ -0,0 +1 @@
/run/runit/supervise.postgresql

View File

@ -1,9 +1,10 @@
# Template file for 'postgresql'
pkgname=postgresql
version=8.4.22
revision=2
version=9.3.5
revision=1
build_style=gnu-configure
configure_args="--with-docdir=/usr/share/doc --with-openssl --with-python
make_build_target="world"
configure_args="--with-openssl --with-python
--with-pam --datadir=/usr/share/postgresql --enable-thread-safety
--with-perl --with-tcl --without-ldap --without-gssapi --without-krb5
--without-bonjour --with-libxml --with-libxslt --disable-rpath
@ -13,9 +14,9 @@ maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.postgresql.org"
license="BSD"
distfiles="ftp://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2"
checksum=5c1d56ce77448706d9dd03b2896af19d9ab1b9b8dcdb96c39707c74675ca3826
checksum=14176ffb1f90a189e7626214365be08ea2bfc26f26994bafb4235be314b9b4b0
hostmakedepends="flex"
hostmakedepends="flex docbook docbook2x openjade"
makedepends="libfl-devel readline-devel>=6.3 libressl-devel perl>=5.20
tcl-devel>=8.6 python-devel libxml2-devel libxslt-devel pam-devel"
conf_files="
@ -33,10 +34,25 @@ if [ "$CROSS_BUILD" ]; then
configure_args+=" --without-perl --without-python --without-tcl"
fi
build_options="systemd"
pre_build() {
# http://www.postgresql.org/docs/9.3/static/docguide-toolsets.html
export SGML_CATALOG_FILES="/usr/share/sgml/openjade/catalog:/usr/share/sgml/iso8879/catalog:/usr/share/sgml/docbook/dsssl/modular/catalog:/usr/share/sgml/docbook/4.2/catalog"
}
post_install() {
vmkdir usr/share/man
cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
vmkdir usr/share/doc/postgresql
cp -r doc/src/sgml/html ${DESTDIR}/usr/share/doc/postgresql
vmkdir etc/sv
cp -r ${FILESDIR}/postgresql ${DESTDIR}/etc/sv
vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname}
vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/${pkgname}-initdb 755 usr/lib/systemd/scripts
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/${pkgname}-initdb 755 usr/lib/systemd/scripts
fi
vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname}
vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \
644 etc/${pkgname} ${pkgname}.conf
@ -72,6 +88,8 @@ postgresql-libs-devel_package() {
done
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/pkgconfig/*"
vmove usr/share/man/man3
vmove usr/lib/postgresql/pgxs
for d in $(find ${DESTDIR}/usr/share/locale \
-type f -name pg_config\* -o -name ecpg\*); do