mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
system/postgresql: Updated for version 8.3.7
This commit is contained in:
parent
a71ad84af3
commit
68b3f43978
5 changed files with 34 additions and 20 deletions
|
@ -1,5 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
|
|
|
@ -10,11 +10,14 @@
|
|||
# Modified by the SlackBuilds.org Project
|
||||
|
||||
PRGNAM=postgresql
|
||||
VERSION=8.3.5
|
||||
VERSION=8.3.7
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
PG_UID=${PG_UID:-209}
|
||||
PG_GID=${PG_GID:-209}
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
|
@ -22,26 +25,27 @@ OUTPUT=${OUTPUT:-/tmp}
|
|||
|
||||
# Bail out if user or group isn't valid on your system
|
||||
# For slackbuilds.org, assigned postgres uid/gid are 209/209
|
||||
# see http://slackbuilds.org/uid_gid.txt
|
||||
# See http://slackbuilds.org/uid_gid.txt
|
||||
# Other popular choice is 26/26
|
||||
if ! grep ^postgres: /etc/group 2>&1 > /dev/null; then
|
||||
echo " Must have a postgres group to run this script."
|
||||
echo " # groupadd -g 209 postgres"
|
||||
echo " Or something similar."
|
||||
echo " You must have a postgres group to run this script."
|
||||
echo " # groupadd -g $PG_GID postgres"
|
||||
exit 1
|
||||
elif ! grep ^postgres: /etc/passwd 2>&1 > /dev/null; then
|
||||
echo " Must have a postgres user to run this script."
|
||||
echo " # useradd -u 209 -g postgres -d /var/lib/pgsql postgres"
|
||||
echo " Or something similar."
|
||||
echo " You must have a postgres user to run this script."
|
||||
echo " # useradd -u $PG_UID -g $PG_GID -d /var/lib/pgsql postgres"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
fi
|
||||
|
||||
set -e # Exit on any and all errors
|
||||
|
@ -57,6 +61,7 @@ chmod -R a-s,u+w,go+r-w .
|
|||
CFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--with-openssl \
|
||||
--with-tcl \
|
||||
--with-perl \
|
||||
|
@ -87,13 +92,16 @@ if [ "$TSEARCH2_COMPAT" != "no" ]; then
|
|||
cd $TMP/$PRGNAM-$VERSION
|
||||
fi
|
||||
|
||||
# some business oriented applications use this extension
|
||||
# Some business oriented applications use this extension
|
||||
cd contrib/pgcrypto
|
||||
make
|
||||
make install-strip DESTDIR=$PKG
|
||||
cd $TMP/$PRGNAM-$VERSION
|
||||
|
||||
gzip -9 $PKG/usr/man/man?/*
|
||||
( cd $PKG/usr/man || exit 1
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
|
||||
)
|
||||
|
||||
mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a COPYRIGHT HISTORY README doc/* $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||
|
@ -119,7 +127,8 @@ mkdir -p $PKG/etc/logrotate.d
|
|||
cat $CWD/postgresql.logrotate > $PKG/etc/logrotate.d/postgresql.new
|
||||
|
||||
mkdir -p $PKG/var/log/setup
|
||||
cat $CWD/setup.$PRGNAM > $PKG/var/log/setup/setup.$PRGNAM
|
||||
sed -e "s%@UID@%$PG_UID%" -e "s%@GID@%$PG_GID%" $CWD/setup.$PRGNAM \
|
||||
> $PKG/var/log/setup/setup.$PRGNAM
|
||||
chmod 755 $PKG/var/log/setup/setup.$PRGNAM
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="postgresql"
|
||||
VERSION="8.3.5"
|
||||
VERSION="8.3.7"
|
||||
HOMEPAGE="http://www.postgresql.org"
|
||||
DOWNLOAD="ftp://ftp.postgresql.org/pub/source/v8.3.5/postgresql-8.3.5.tar.bz2"
|
||||
MD5SUM="3bc028774d7a79e926be0c6a9c7ca209"
|
||||
DOWNLOAD="ftp://ftp.postgresql.org/pub/source/v8.3.7/postgresql-8.3.7.tar.bz2"
|
||||
MD5SUM="7b7e91a2221e55fe1b167e663217a96d"
|
||||
MAINTAINER="Adis Nezirovic"
|
||||
EMAIL="adis_at_linux.org.ba"
|
||||
APPROVED="dsomero"
|
||||
APPROVED="rworkman"
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
PG_HOME=/var/lib/pgsql
|
||||
PG_USER=postgres
|
||||
PG_USER_ID=209
|
||||
PG_USER_ID=@UID@
|
||||
PG_GROUP=postgres
|
||||
PG_GROUP_ID=209
|
||||
PG_GROUP_ID=@GID@
|
||||
|
||||
echo "Adding PostgreSQL user and group..."
|
||||
groupadd -g $PG_GROUP_ID $PG_GROUP
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler-------------------------------------------------|
|
||||
postgresql: PostgreSQL (object-relational database management system)
|
||||
postgresql:
|
||||
|
|
Loading…
Reference in a new issue