VERSION=7.3.3 FTP=ftp://ftp3.nl.postgresql.org/pub/mirrors/postgresql/source/v${VERSION} all: get configure clean: rm -f postgresql-${VERSION}.tar; rm -rf postgresql-${VERSION}; su postgres -c "rm -rf /home/postgres/pg"; su -c "rm -rf /usr/local/pg"; get : postgresql-${VERSION}/configure configure: postgresql-${VERSION}/config.status postgresql-${VERSION}/config.status: cd postgresql-${VERSION};\ ./configure \ --prefix=/home/postgres/pg \ --with-pgport=10123 \ --with-perl \ --with-openssl \ --enable-depend \ --with-maxbackends=64 \ ;\ make ;\ su postgres -c "make install"; su -c "mkdir -p /usr/local/pg && chown postgres: /usr/local/pg"; su postgres -c "/home/postgres/pg/bin/initdb -D /usr/local/pg"; su postgres -c "/home/postgres/pg/bin/postmaster -D /usr/local/pg -i -d 1"; postgresql-${VERSION}/configure: postgresql-${VERSION}.tar tar -vxf postgresql-${VERSION}.tar; postgresql-${VERSION}.tar: postgresql-${VERSION}.tar.gz gzip -cd postgresql-${VERSION}.tar.gz > postgresql-${VERSION}.tar postgresql-${VERSION}.tar.gz: ncftpget ${FTP}/postgresql-${VERSION}.tar.gz