#!/bin/sh ## VectorLinux build script for PostgreSQL ## $Date: 2007/09/19 $ ## Licensed under GNU GPL v2 ## by Joe1962 for Vector Linux 5.8 Standard PRGNAM=postgresql VERSION=8.2.5 ARCH=i586 BUILD=1 TAG=vl58 CWD=$(pwd) # Current Working Directory. TMP=/tmp/$PRGNAM/build # Temp build directory. PKG=/tmp/$PRGNAM/package # Temp packaging directory. # Exit on any and all errors set -e # Set CFLAGS: SLKCFLAGS="-O2 -march=i586 -mtune=i686" # Make sure we start from clean state rm -rf /tmp/$PRGNAM/ mkdir -p $TMP $PKG cd $TMP tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 # Fix permissions here. chmod -R a-s,u+w,go+r-w $PRGNAM-$VERSION chown -R root:root $PRGNAM-$VERSION cd $TMP/$PRGNAM-$VERSION CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/opt/postgresql \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --enable-nls \ --with-perl \ --with-python \ --with-tcl \ --with-openssl \ --with-ldap \ --enable-thread-safety || exit 1 make || exit 1 make DESTDIR=$PKG install-strip || exit 1 # man pages gzip -9 $PKG/usr/man/man?/* # docs mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYRIGHT \ HISTORY \ README \ INSTALL \ $PKG/usr/doc/$PRGNAM-$VERSION/ # more docs cp -a COPYRIGHT \ HISTORY \ README \ INSTALL \ $PKG/opt/postgresql/doc/ mkdir -p $PKG/opt/postgresql/doc/html/FAQ cp -a ./doc/src/FAQ/* $PKG/opt/postgresql/doc/html/FAQ/ mkdir -p $PKG/opt/postgresql/doc/FAQ cp -a ./doc/FAQ* $PKG/opt/postgresql/doc/FAQ/ cp -a ./doc/TODO.detail $PKG/opt/postgresql/doc/ cp -a ./doc/KNOWN_BUGS $PKG/opt/postgresql/doc/ cp -a ./doc/MISSING_FEATURES $PKG/opt/postgresql/doc/ cp -a ./doc/README.mb.big5 $PKG/opt/postgresql/doc/ cp -a ./doc/README.mb.jp $PKG/opt/postgresql/doc/ cp -a ./doc/TODO $PKG/opt/postgresql/doc/ cp -a ./doc/bug.template $PKG/opt/postgresql/doc/ # Tutorial cd ./src/tutorial make || exit 1 cd $TMP/$PRGNAM-$VERSION cp -a ./src/tutorial $PKG/opt/postgresql/share/ # install dir mkdir -p $PKG/install cp -a $CWD/doinst.sh $PKG/install/ cp -a $CWD/slack-required $PKG/install/ cp -a $CWD/slack-desc $PKG/install/ # SlackBuild script cp -a $CWD/postgresql.SlackBuild $PKG/install/ cp -a $CWD/postgresql.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/ cp -a $CWD/postgresql.SlackBuild $PKG/opt/postgresql/doc/ ## make the package cd $PKG tar xjvf $CWD/opt.tar.bz2 || exit 1 tar xjvf $CWD/usr.tar.bz2 || exit 1 tar xjvf $CWD/etc.tar.bz2 || exit 1 /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tlz