the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: postgresql74-unified
Version: 7.4.21
Revision: 1
Description: PostgreSQL open-source database
License: BSD
Maintainer: Benjamin Reed
Depends: <<
fink-obsolete-packages,
daemonic (>= 20010902-1),
libxml2-shlibs,
libxslt-shlibs,
passwd (>= 20030906-1),
readline5-shlibs,
%N-shlibs (>= %v-%r)
<<
BuildDepends: <<
bison,
fink (>= 0.26.0-1),
libxml2,
libxslt,
passwd (>= 20030906-1),
readline5,
system-openssl-dev
<<
Provides: postgresql-server
Conflicts: <<
postgresql (<< %v-%r),
postgresql-ssl (<< %v-%r)
<<
Replaces: <<
postgresql (<< %v-%r),
postgresql-ssl (<< %v-%r),
postgresql-shlibs,
postgresql-ssl-shlibs,
postgresql-python,
postgresql-ssl-python,
postgresql-perl,
postgresql-ssl-perl,
postgresql73,
postgresql73-ssl,
postgresql74 (<< %v-%r),
postgresql74-ssl (<< %v-%r)
<<
CustomMirror: <<
afr-ZA: ftp://ftp.za.postgresql.org/mirror/ftp.postgresql.org
asi-CN: ftp://ftp.cn.postgresql.org/ftp.postgresql.org
asi-GE: ftp://ftp.ge.postgresql.org/pub/postgresql
asi-HK: ftp://ftp.hk.postgresql.org/postgresql
asi-ID: ftp://ftp8.id.postgresql.org/pub/PostgreSQL
asi-ID: ftp://ftp9.id.postgresql.org/postgresql
asi-JP: ftp://ftp.jp.postgresql.org
asi-KR: ftp://ftp.kr.postgresql.org/mirror/database/postgresql
asi-TW: ftp://ftp.tw.postgresql.org/pub/postgresql
asi-TW: ftp://ftp3.tw.postgresql.org/pub/postgresql
asi-TW: ftp://ftp5.tw.postgresql.org/pub/Unix/Database/PostgreSQL
aus-AU: ftp://ftp.au.postgresql.org/pub/postgresql
aus-AU: ftp://ftp2.au.postgresql.org/pub/postgresql
aus-AU: ftp://ftp3.au.postgresql.org/pub/postgresql
aus-NZ: ftp://ftp.nz.postgresql.org/postgresql
eur-AT: ftp://ftp.at.postgresql.org/db/www.postgresql.org/pub
eur-BE: ftp://ftp.be.postgresql.org/postgresql
eur-BA: ftp://ftp.ba.postgresql.org/pub/postgresql
eur-BG: ftp://ftp3.bg.postgresql.org/postgresql
eur-CH: ftp://ftp2.ch.postgresql.org/mirror/postgresql
eur-CZ: ftp://ftp.cz.postgresql.org/pub/ftp.postgresql.org
eur-CZ: ftp://ftp2.cz.postgresql.org/pub/postgresql
eur-DE: ftp://ftp.de.postgresql.org/mirror/postgresql
eur-DE: ftp://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org
eur-DE: ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org
eur-DE: ftp://ftp8.de.postgresql.org/pub/misc/pgsql
eur-DE: ftp://ftp9.de.postgresql.org/unix/databases/postgresql
eur-DK: ftp://ftp.dk.postgresql.org/mirrors/postgresql
eur-EE: ftp://ftp.ee.postgresql.org/mirrors/postgresql
eur-ES: ftp://ftp5.es.postgresql.org/mirror/postgresql
eur-FR: ftp://ftp.fr.postgresql.org
eur-FR: ftp://ftp2.fr.postgresql.org/postgresql
eur-FR: ftp://ftp3.fr.postgresql.org/pub/postgresql
eur-GR: ftp://ftp.gr.postgresql.org/pub/databases/postgresql
eur-GR: ftp://ftp2.gr.postgresql.org/pub/databases/postgresql
eur-HR: ftp://ftp.hr.postgresql.org/postgresql
eur-HU: ftp://ftp3.hu.postgresql.org/pub/postgresql
eur-IE: ftp://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub
eur-IE: ftp://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org
eur-IL: ftp://ftp.il.postgresql.org/ftp.postgresql.org
eur-IS: ftp://ftp.is.postgresql.org/pub/postgresql
eur-IT: ftp://ftp2.it.postgresql.org/mirrors/postgres
eur-IT: ftp://ftp6.it.postgresql.org/pub/PostgreSQL
eur-IT: ftp://ftp7.it.postgresql.org/pub/unix/postgres
eur-LV: ftp://ftp.lv.postgresql.org/pub/software/postgresql
eur-NL: ftp://ftp.eu.postgresql.org/pub/unix/db/postgresql
eur-NL: ftp://ftp.nl.postgresql.org:21/pub/mirror/postgresql
eur-NL: ftp://ftp2.nl.postgresql.org/mirror/postgresql
eur-NL: ftp://ftp4.nl.postgresql.org/postgresql.zeelandnet.nl
eur-NO: ftp://ftp.no.postgresql.org/pub/databases/postgresql
eur-PL: ftp://ftp6.pl.postgresql.org/pub/postgresql
eur-PL: ftp://ftp7.pl.postgresql.org/pub/mirror/ftp.postgresql.org
eur-PL: ftp://ftp8.pl.postgresql.org/pub/postgresql
eur-PT: ftp://ftp.pt.postgresql.org/postgresql
eur-RO: ftp://ftp6.ro.postgresql.org/pub/mirrors/ftp.postgresql.org
eur-RU: ftp://ftp.ru.postgresql.org/pub/mirrors/pgsql
eur-RU: ftp://ftp2.ru.postgresql.org/pub/databases/postgresql
eur-RU: ftp://ftp3.ru.postgresql.org/pub/mirror/postgresql/pub
eur-RU: ftp://ftp6.ru.postgresql.org/pub/pgsql
eur-SE: ftp://ftp.se.postgresql.org/pub/database/relational/postgresql
eur-SK: ftp://ftp2.sk.postgresql.org/pub/postgresql
eur-UK: ftp://ftp2.uk.postgresql.org/sites/ftp.postgresql.org
eur-UK: ftp://ftp4.uk.postgresql.org/sites/ftp.postgresql.org
eur-UK: ftp://ftp8.uk.postgresql.org/sites/ftp.postgresql.org
nam-CA: ftp://ftp3.ca.postgresql.org/pub
nam-CA: ftp://ftp4.ca.postgresql.org/pub/postgresql
sam-BR: ftp://ftp.br.postgresql.org/pub/PostgreSQL
sam-CL: ftp://ftp.cl.postgresql.org/ftp/pub/postgresql
sam-CO: ftp://ftp.co.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp.us.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp3.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp4.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp5.us.postgresql.org/pub/PostgreSQL
nam-US: ftp://ftp8.us.postgresql.org/postgresql
nam-US: ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp10.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp22.us.postgresql.org/mirrors/ftp.postgresql.org
<<
Source: mirror:custom:source/v%v/postgresql-%v.tar.bz2
Source-MD5: b372d271bb30f703c241c7cc3d58f198
PatchScript: sed -e 's|@BUILDDIR@|%b|g' -e 's|@INSTPREFIX@|%p|g' < %a/%n.patch | patch -p1
SetMAKEFLAGS: -j1
NoSetMAKEFLAGS: true
ConfigureParams: (%m = i386) --disable-spinlocks --prefix=%p --docdir=%p/share/doc --mandir=%p/share/man --enable-multibyte --enable-recode --with-CXX --without-perl --without-python --with-openssl --with-libraries=%p/lib --with-includes=%p/include --without-tcl --without-tk --without-java --enable-odbc --with-pam --with-rendezvous --enable-syslog --with-krb5=/usr
CompileScript: <<
#!/bin/sh -xe
export lt_cv_sys_max_cmd_len=65536
export CPPFLAGS="-I%p/lib/system-openssl/include -I%p/include -DHAVE_OPTRESET"
export LDFLAGS="-L%p/lib/system-openssl/lib -L%p/lib"
export SHELL="/bin/sh -xe"
PG_ID=`id -u postgres 2>/dev/null || true`
if [ -z "$PG_ID" ]; then
echo "Whoa there! You must have a postgres user to build this package."
echo "Please do a 'fink reinstall passwd' and make sure you hit 'y' when it"
echo "asks if you want to update your users."
exit 1
fi
# postgresql
perl -pi -e 's,hardcode_direct=yes,hardcode_direct=no,g' configure && \
./configure %c && \
make includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql && \
make -C contrib || exit 1
<<
InstallScript: <<
#!/bin/sh -xe
export SHELL="/bin/sh -xe"
# postgresql
make install install-all-headers includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql DESTDIR=%d INSTALLSITEMAN3DIR=%i/share/man/man3 || exit 10
make -C contrib install includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql DESTDIR=%d INSTALLSITEMAN3DIR=%i/share/man/man3
install -m 755 contrib/adddepend/adddepend %i/bin/adddepend
find %i/share -ls > /tmp/sharefiles-postgresql.txt
mv %i/share/doc/postgresql-7.4 %i/share/doc/%N >/dev/null 2>&1
ranlib %i/lib/*.a
install -d -m 755 %i/share/doc/%N
find contrib -name README.* -exec cp {} %i/share/doc/%N/ \;
install -d -m 755 %i/bin
install -c -m 755 pgsql.sh %i/bin/
install -d -m 755 %i/var/postgresql-7.4
echo "be sure to back up this database before any upgrades!" >> %i/var/postgresql-7.4/README
rm -rf %i/bin/postmaster
ln -sf postgres-7.4 %i/bin/postmaster
install -d -m 755 %i/var/log
ln -sf %p/var/postgresql-7.4/pgsql.log %i/var/log/pgsql-7.4.log
for libname in libecpg.4.1 libecpg_compat.1.2 libpgtypes.1.2 libpq.3.1; do
mv %i/lib/$libname.dylib %i/lib/$libname.dylib-7.4
done
rm -rf %i/lib/libecpg.*.dylib
rm -rf %i/lib/libecpg_compat.*.dylib
rm -rf %i/lib/libpgtypes.*.dylib
rm -rf %i/lib/libpq.*.dylib
for file in `ls -1 %i/bin/`; do
mv "%i/bin/${file}" "%i/bin/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/binary.list
install_name_tool -change %p/lib/libpq.3.dylib %p/lib/libpq.3.1.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg.4.dylib %p/lib/libecpg.4.1.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg_compat.1.dylib %p/lib/libecpg_compat.1.2.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libpgtypes.1.dylib %p/lib/libpgtypes.1.2.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
done
for file in `find %i/lib -type f`; do
install_name_tool -change %p/lib/libpq.3.dylib %p/lib/libpq.3.1.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg.4.dylib %p/lib/libecpg.4.1.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg_compat.1.dylib %p/lib/libecpg_compat.1.2.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libpgtypes.1.dylib %p/lib/libpgtypes.1.2.dylib "$file" >/dev/null 2>&1 || :
done
for file in `ls -1 %i/share/man/man1/`; do
mv "%i/share/man/man1/${file}" "%i/share/man/man1/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/man1.list
done
for file in `ls -1 %i/share/man/man7/`; do
mv "%i/share/man/man7/${file}" "%i/share/man/man7/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/man7.list
done
cat <
#!/bin/sh
for arg in "\$@"; do
case \$arg in
-h|--h|--he|--hel|--help)
echo "usage: \$0 [-h]"
echo ""
echo " -h, --help this help"
echo ""
exit 0;
;;
*)
echo "\$0: unknown argument '\$arg'"
exit 1;
;;
esac
done
update-alternatives --remove "libecpg.4.1.dylib" "%p/lib/libecpg.4.1.dylib-7.4"
update-alternatives --remove "libecpg.4.dylib" "%p/lib/libecpg.4.1.dylib-7.4"
update-alternatives --remove "libecpg_compat.1.2.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4"
update-alternatives --remove "libecpg_compat.1.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4"
update-alternatives --remove "libpgtypes.1.2.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4"
update-alternatives --remove "libpgtypes.1.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4"
update-alternatives --remove "libpq.3.1.dylib" "%p/lib/libpq.3.1.dylib-7.4"
update-alternatives --remove "libpq.3.dylib" "%p/lib/libpq.3.1.dylib-7.4"
for tuple in %p/bin:binary.list %p/share/man/man1:man1.list %p/share/man/man7:man7.list; do
TUPLE_PATH=\`echo \$tuple | cut -d: -f1\`
TUPLE_FILE=\`echo \$tuple | cut -d: -f2\`
for file in \`cat %p/var/postgresql-7.4/\${TUPLE_FILE}\`; do
update-alternatives --remove "\${file}" "\${TUPLE_PATH}/\${file}-7.4"
done
done
END
cat <
#!/bin/sh
FORCE=0
for arg in "\$@"; do
case \$arg in
-h|--h|--he|--hel|--help)
echo "usage: \$0 [-h] [-f]"
echo ""
echo " -h, --help this help"
# echo " -f, --force force this version of PostgreSQL, even if there is a newer one"
echo ""
exit 0;
;;
# -f|--f|--fo|--for|--forc|--force)
# FORCE=1
# ;;
*)
echo "\$0: unknown argument '\$arg'"
exit 1;
;;
esac
done
if [ -e "%p/lib/libecpg.4.1.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libecpg.4.1.dylib" "libecpg.4.1.dylib" "%p/lib/libecpg.4.1.dylib-7.4" 0401000704
update-alternatives --install "%p/lib/libecpg.4.dylib" "libecpg.4.dylib" "%p/lib/libecpg.4.1.dylib-7.4" 0401000704
else
echo "WARNING: %p/lib/libecpg.4.1.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libecpg_compat.1.2.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libecpg_compat.1.2.dylib" "libecpg_compat.1.2.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4" 0102000704
update-alternatives --install "%p/lib/libecpg_compat.1.dylib" "libecpg_compat.1.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4" 0102000704
else
echo "WARNING: %p/lib/libecpg_compat.1.2.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libpgtypes.1.2.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libpgtypes.1.2.dylib" "libpgtypes.1.2.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4" 0102000704
update-alternatives --install "%p/lib/libpgtypes.1.dylib" "libpgtypes.1.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4" 0102000704
else
echo "WARNING: %p/lib/libpgtypes.1.2.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libpq.3.1.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libpq.3.1.dylib" "libpq.3.1.dylib" "%p/lib/libpq.3.1.dylib-7.4" 0301000704
update-alternatives --install "%p/lib/libpq.3.dylib" "libpq.3.dylib" "%p/lib/libpq.3.1.dylib-7.4" 0301000704
else
echo "WARNING: %p/lib/libpq.3.1.dylib-7.4 does not exist"
fi
for tuple in %p/bin:binary.list %p/share/man/man1:man1.list %p/share/man/man7:man7.list; do
TUPLE_PATH=\`echo \$tuple | cut -d: -f1\`
TUPLE_FILE=\`echo \$tuple | cut -d: -f2\`
for file in \`cat %p/var/postgresql-7.4/\${TUPLE_FILE}\`; do
if [ -e "\${TUPLE_PATH}/\${file}-7.4" ]; then
update-alternatives --install "\${TUPLE_PATH}/\${file}" "\${file}" "\${TUPLE_PATH}/\${file}-7.4" 74
fi
done
done
END
chmod 755 %i/var/postgresql-7.4/*.sh
perl -pi -e 's,^%d,,' %i/bin/pg_config*
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
SplitOff: <<
Package: %N-dev
Description: PostgreSQL development headers and libraries
Depends: <<
%N (>= %v-%r),
fink-obsolete-packages
<<
Conflicts: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev (<< %v-%r),
postgresql74-ssl-dev (<< %v-%r),
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
postgresql81-dev,
postgresql82-dev,
postgresql83-dev
<<
Replaces: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev,
postgresql74-ssl-dev,
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
%N (<< %v-%r),
postgresql81-dev,
postgresql82-dev,
postgresql83-dev
<<
BuildDependsOnly: true
Files: <<
bin/pg_config*
include
lib/*.a
lib/libecpg.dylib
lib/libecpg_compat.dylib
lib/libpgtypes.dylib
lib/libpq.dylib
share/man/man1/pg_config*
<<
PostInstScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
PreRmScript: [ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
PostRmScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
<<
SplitOff2: <<
Package: %N-shlibs
Description: PostgreSQL shared libraries
Conflicts: <<
postgresql74-shlibs (<< %v-%r),
postgresql74-ssl-shlibs (<< %v-%r)
<<
Replaces: <<
postgresql74 (<< %v-%r),
postgresql74-ssl (<< %v-%r),
postgresql73-shlibs,
postgresql73-ssl-shlibs,
postgresql73-unified-shlibs,
postgresql74-shlibs (<< %v-%r),
postgresql74-ssl-shlibs (<< %v-%r),
postgresql74-unified-shlibs (<< %v-%r),
postgresql,
postgresql-shlibs
<<
Files: lib/*.dylib* var/postgresql-7.4/*.sh var/postgresql-7.4/*.list
Shlibs: <<
%p/lib/libecpg.4.dylib 4.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libecpg_compat.1.dylib 1.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libpgtypes.1.dylib 1.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libpq.3.dylib 3.0.0 postgresql73-unified-shlibs (>= 7.3.0-1) | postgresql74-unified-shlibs (>= 7.4.0-1)
<<
PostInstScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
PreRmScript: [ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
<<
SplitOff3: <<
Package: postgresql74
Description: upgrade package for postgresql74
Depends: <<
%N (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
<<
SplitOff4: <<
Package: postgresql74-shlibs
Description: upgrade package for postgresql74-shlibs
Depends: <<
%N-shlibs (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff5: <<
Package: postgresql74-dev
Description: upgrade package for postgresql74-dev
Depends: <<
%N-dev (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
BuildDependsOnly: true
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff6: <<
Package: postgresql74-ssl
Description: upgrade package for postgresql74-ssl
Depends: <<
%N (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
<<
SplitOff7: <<
Package: postgresql74-ssl-shlibs
Description: upgrade package for postgresql74-ssl-shlibs
Depends: <<
%N-shlibs (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff8: <<
Package: postgresql74-ssl-dev
Description: upgrade package for postgresql74-ssl-dev
Depends: <<
%N-dev (>= %v-%r),
fink (>= 0.26.0-1),
fink-obsolete-packages
<<
BuildDependsOnly: true
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
PostInstScript: <<
INSTALL_PHASE="$1"
[ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
# remove the old "pgsql" entries from netinfo; the username was switched to
# "postgres" but the old ones hang around because of the way niload works
niutil -destroy . /users/pgsql >/dev/null 2>&1 || true
niutil -destroy . /groups/pgsql >/dev/null 2>&1 || true
die () {
echo "failed"
echo ""
echo "*** bailing because an error ocurred:"
echo ""
echo "$*"
exit 1
}
# update daemonic init script if necessary
daemonic install %N
# get a nice port to run on
while true; do
PGPORT=$RANDOM;
if [ "$PGPORT" -gt 10000 ] && [ "$PGPORT" -lt 20000 ]; then
break
fi
done
export PGPORT
echo "- starting PostgreSQL on port $PGPORT"
if %p/bin/pgsql.sh-7.4 start >/tmp/pgstart-7.4.log 2>&1; then
sleep 5
ERROR=0
# install the plpgsql language if possible
printf -- "- attempting to install the plpgsql language in the template1 database... "
%p/bin/createlang-7.4 -U postgres -p $PGPORT plpgsql template1 >/tmp/createlang-7.4.log 2>&1 || ERROR="$?"
if [ $ERROR -eq 0 ]; then
echo "done"
elif [ $ERROR -gt 0 ] && [ $ERROR -ne 2 ]; then
echo "WARNING: an unknown error occurred inserting the plpgsql language"
else
:
fi
sleep 5
%p/bin/pgsql.sh-7.4 stop >/dev/null 2>&1 || echo "WARNING: unable to stop postgresql: run 'PGPORT=$PGPORT sudo %p/bin/pgsql.sh-7.4 stop' to try again"
else
cat <
If you wish to install it manually, run:
sudo %p/bin/pgsql.sh-7.4 start
sudo -u postgres %p/bin/createlang-7.4 plpgsql template1
END
fi
<<
PreRmScript: <<
[ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
# clean up
daemonic remove postgresql >/dev/null 2>&1 || true
daemonic remove postgresql74 >/dev/null 2>&1 || true
daemonic remove postgresql74-ssl >/dev/null 2>&1 || true
if [ $1 != "upgrade" ]; then
daemonic remove %N
fi
<<
PostRmScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
DaemonicFile: <<
<<
Homepage: http://www.postgresql.org/
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
DescPackaging: <<
IMPORTANT: The location of the data files has changed from early
revisions of this package. If you're upgrading from an earlier
revision, note that this one expects the data files to be installed
at
When run from the startup script, logs output to
<<
DescPort: <<
Rearranged a lot of the PostgreSQL build to be more "correct" on
Darwin, including making proper dylibs (instead of bundles, which
ended up creating static binaries).
<<
--- postgresql-7.4.19/contrib/Makefile 2003-09-11 13:15:27.000000000 -0400
+++ postgresql-7.4.19-new/contrib/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -37,7 +37,6 @@
string \
tablefunc \
tips \
- tsearch \
tsearch2 \
userlock \
vacuumlo
--- postgresql-7.4.19/contrib/btree_gist/Makefile 2003-03-20 13:59:18.000000000 -0500
+++ postgresql-7.4.19-new/contrib/btree_gist/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
+DLTYPE = module
subdir = contrib/btree_gist
+
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/chkpass/Makefile 2002-10-21 14:55:10.000000000 -0400
+++ postgresql-7.4.19-new/contrib/chkpass/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.4 2002/10/21 18:55:10 petere Exp $
+DLTYPE = module
+
subdir = contrib/chkpass
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/contrib-global.mk 2003-08-23 00:23:38.000000000 -0400
+++ postgresql-7.4.19-new/contrib/contrib-global.mk 2008-01-15 10:55:01.000000000 -0500
@@ -42,6 +42,9 @@
#
# Better look at some of the existing uses for examples...
+ifeq ($(DLTYPE), bundle)
+override DARWIN_LINKFLAGS := $(DARWIN_LINKFLAGS) -bundle_loader $(top_srcdir)/src/backend/postgres
+endif
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
--- postgresql-7.4.19/contrib/cube/Makefile 2003-09-13 21:52:25.000000000 -0400
+++ postgresql-7.4.19-new/contrib/cube/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.10 2003/09/14 01:52:25 tgl Exp $
+DLTYPE = module
+
subdir = contrib/cube
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dblink/Makefile 2002-09-14 16:28:54.000000000 -0400
+++ postgresql-7.4.19-new/contrib/dblink/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/dblink/Makefile,v 1.7 2002/09/14 20:28:54 tgl Exp $
+DLTYPE = module
+
subdir = contrib/dblink
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dbmirror/Makefile 2002-06-23 17:58:07.000000000 -0400
+++ postgresql-7.4.19-new/contrib/dbmirror/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/dbmirror/Attic/Makefile,v 1.1 2002/06/23 21:58:07 momjian Exp $
+DLTYPE = module
+
subdir = contrib/dbmirror
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dbsize/Makefile 2002-02-22 18:05:35.000000000 -0500
+++ postgresql-7.4.19-new/contrib/dbsize/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/dbsize
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/earthdistance/Makefile 2002-09-19 23:47:22.000000000 -0400
+++ postgresql-7.4.19-new/contrib/earthdistance/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.12 2002/09/20 03:47:22 momjian Exp $
+DLTYPE = module
+
subdir = contrib/earthdistance
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/fulltextindex/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/fulltextindex/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/fulltextindex
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/fuzzystrmatch/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/fuzzystrmatch/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/fuzzystrmatch/Makefile,v 1.2 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/fuzzystrmatch
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/intagg/Makefile 2002-02-24 23:16:58.000000000 -0500
+++ postgresql-7.4.19-new/contrib/intagg/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -4,6 +4,8 @@
# by Mark L. Woodward
# $Header: /cvsroot/pgsql/contrib/intagg/Makefile,v 1.3 2002/02/25 04:16:58 tgl Exp $
+DLTYPE = module
+
subdir = contrib/intagg
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/intarray/Makefile 2003-06-11 14:44:14.000000000 -0400
+++ postgresql-7.4.19-new/contrib/intarray/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.9 2003/06/11 18:44:14 momjian Exp $
+DLTYPE = module
+
subdir = contrib/intarray
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/isbn_issn/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/isbn_issn/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/isbn_issn
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/lo/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/lo/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/lo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/ltree/Makefile 2002-11-01 18:16:52.000000000 -0500
+++ postgresql-7.4.19-new/contrib/ltree/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/ltree
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/miscutil/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/miscutil/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.16 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/miscutil
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/noupdate/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/noupdate/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.9 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/noupdate
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/pgcrypto/Makefile 2001-09-30 18:18:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/pgcrypto/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -2,6 +2,9 @@
# $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.9 2001/09/30 22:18:29 momjian Exp $
#
+DLTYPE = module
+
+
subdir = contrib/pgcrypto
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/pgstattuple/Makefile 2001-09-30 21:52:38.000000000 -0400
+++ postgresql-7.4.19-new/contrib/pgstattuple/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -6,6 +6,8 @@
#
#-------------------------------------------------------------------------
+DLTYPE = module
+
subdir = contrib/pgstattuple
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/rserv/Makefile 2002-11-01 18:45:37.000000000 -0500
+++ postgresql-7.4.19-new/contrib/rserv/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,6 +1,8 @@
# Makefile for erServer demonstration implementation
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.
+DLTYPE = module
+
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/rtree_gist/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/rtree_gist/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/rtree_gist/Attic/Makefile,v 1.3 2001/09/06 10:49:30 petere Exp $
+DLTYPE = module
+
subdir = contrib/rtree_gist
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/seg/Makefile 2003-09-13 22:18:49.000000000 -0400
+++ postgresql-7.4.19-new/contrib/seg/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.10 2003/09/14 02:18:49 tgl Exp $
+DLTYPE = module
+
subdir = contrib/seg
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/spi/Makefile 2002-10-03 14:40:02.000000000 -0400
+++ postgresql-7.4.19-new/contrib/spi/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.22 2002/10/03 18:40:02 tgl Exp $
+DLTYPE = module
+
subdir = contrib/spi
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/string/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/string/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp $
+DLTYPE = module
+
subdir = contrib/string
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tablefunc/Makefile 2002-09-11 20:14:40.000000000 -0400
+++ postgresql-7.4.19-new/contrib/tablefunc/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/tablefunc
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tsearch/Makefile 2002-11-01 18:23:29.000000000 -0500
+++ postgresql-7.4.19-new/contrib/tsearch/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/tsearch/Attic/Makefile,v 1.3 2002/11/01 23:23:29 tgl Exp $
+DLTYPE = module
+
subdir = contrib/tsearch
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tsearch2/Makefile 2003-08-26 06:01:02.000000000 -0400
+++ postgresql-7.4.19-new/contrib/tsearch2/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/tsearch2/Makefile,v 1.5 2003/08/26 10:01:02 teodor Exp $
+DLTYPE = module
+
subdir = contrib/tsearch2
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/userlock/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/userlock/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp $
+DLTYPE = module
+
subdir = contrib/userlock
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/xml/Makefile 2002-10-22 16:03:09.000000000 -0400
+++ postgresql-7.4.19-new/contrib/xml/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/xml/Attic/Makefile,v 1.3 2002/10/22 20:03:09 petere Exp $
+DLTYPE = module
+
subdir = contrib/xml
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/pgsql.sh 1969-12-31 19:00:00.000000000 -0500
+++ postgresql-7.4.19-new/pgsql.sh 2008-01-15 11:04:20.000000000 -0500
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+die () {
+ echo "failed"
+ echo ""
+ echo "*** bailing because an error ocurred:"
+ echo ""
+ echo "$*"
+ exit 1
+}
+
+PREFIX="@INSTPREFIX@"
+DATADIR="${PREFIX}/var/postgresql-7.4/data"
+LOGFILE="${PREFIX}/var/postgresql-7.4/pgsql.log"
+
+export LANG=C
+unset LC_ALL
+
+SHMMAX=`sysctl kern.sysv.shmmax | cut -d' ' -f2-`
+SHMMNI=`sysctl kern.sysv.shmmni | cut -d' ' -f2-`
+SHMALL=`sysctl kern.sysv.shmall | cut -d' ' -f2-`
+
+if [ "$SHMMAX" -lt "8388608" ] || [ "$SHMMNI" -lt "64" ] || [ "$SHMALL" -lt "32768" ]; then
+ echo "WARNING: You probably need to set your shared memory resources higher for"
+ echo " PostgreSQL to function. For more information on raising your shared"
+ echo " memory settings, see:"
+ echo " http://wiki.finkproject.org/index.php/Shared_Memory_Regions_on_Darwin"
+ echo ""
+ echo " I am also creating a default configuration in /etc/sysctl.conf.pg"
+ echo " that contains values that will work with the default PostgreSQL "
+ echo " memory settings. To use it, rename it to /etc/sysctl.conf (if you"
+ echo " don't have one already) and reboot."
+ echo ""
+ echo " For now, I'll try setting your sysctl to something higher and then"
+ echo " running things anyways. Good luck! =)"
+ echo ""
+ sysctl -w kern.sysv.shmmax=8388608
+ sysctl -w kern.sysv.shmmin=1
+ sysctl -w kern.sysv.shmmni=64
+ sysctl -w kern.sysv.shmseg=8
+ sysctl -w kern.sysv.shmall=32768
+ echo ""
+ cat <
+kern.sysv.shmmax=8388608
+kern.sysv.shmmin=1
+kern.sysv.shmmni=64
+kern.sysv.shmseg=8
+kern.sysv.shmall=32768
+END
+fi
+
+if [ ! -d "$DATADIR" ]; then
+ printf -- "- making postgresql directories: "
+ sudo mkdir -p "$DATADIR"
+ sudo chown -R postgres "$DATADIR/.."
+ echo "ok"
+
+ printf -- "- initializing database in $DATADIR: "
+ sudo -u postgres ${PREFIX}/bin/initdb-7.4 -D "$DATADIR" >/tmp/pgsql-init-7.4.log 2>&1 || die "couldn't initialize database"
+ echo "ok"
+fi
+
+case "$1" in
+ start)
+ unset LC_ALL; LANG=C sudo -u postgres "${PREFIX}/bin/pg_ctl-7.4" start -D "$DATADIR" -l "$LOGFILE"
+ ;;
+ restart)
+ unset LC_ALL; LANG=C sudo -u postgres "${PREFIX}/bin/pg_ctl-7.4" restart -D "$DATADIR" -m fast
+ ;;
+ stop)
+ unset LC_ALL; LANG=C sudo -u postgres "${PREFIX}/bin/pg_ctl-7.4" stop -D "$DATADIR" -m fast
+ ;;
+esac
--- postgresql-7.4.19/src/Makefile.global.in 2003-12-19 18:29:29.000000000 -0500
+++ postgresql-7.4.19-new/src/Makefile.global.in 2008-01-15 10:55:01.000000000 -0500
@@ -65,21 +65,21 @@
libexecdir := @libexecdir@
ifeq "$(findstring pgsql, $(libexecdir))" ""
ifeq "$(findstring postgres, $(libexecdir))" ""
-override libexecdir := $(libexecdir)/postgresql
+override libexecdir := $(libexecdir)/postgresql-7.4
endif
endif
datadir := @datadir@
ifeq "$(findstring pgsql, $(datadir))" ""
ifeq "$(findstring postgres, $(datadir))" ""
-override datadir := $(datadir)/postgresql
+override datadir := $(datadir)/postgresql-7.4
endif
endif
sysconfdir := @sysconfdir@
ifeq "$(findstring pgsql, $(sysconfdir))" ""
ifeq "$(findstring postgres, $(sysconfdir))" ""
-override sysconfdir := $(sysconfdir)/postgresql
+override sysconfdir := $(sysconfdir)/postgresql-7.4
endif
endif
@@ -87,7 +87,7 @@
pkglibdir = $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
-override pkglibdir := $(pkglibdir)/postgresql
+override pkglibdir := $(pkglibdir)/postgresql-7.4
endif
endif
@@ -95,7 +95,7 @@
pkgincludedir = $(includedir)
ifeq "$(findstring pgsql, $(pkgincludedir))" ""
ifeq "$(findstring postgres, $(pkgincludedir))" ""
-override pkgincludedir := $(pkgincludedir)/postgresql
+override pkgincludedir := $(pkgincludedir)/postgresql-7.4
endif
endif
includedir_server = $(pkgincludedir)/server
@@ -107,7 +107,7 @@
docdir := @docdir@
ifeq "$(findstring pgsql, $(docdir))" ""
ifeq "$(findstring postgres, $(docdir))" ""
-override docdir := $(docdir)/postgresql
+override docdir := $(docdir)/postgresql-7.4
endif
endif
--- postgresql-7.4.19/src/Makefile.shlib 2005-12-03 15:17:00.000000000 -0500
+++ postgresql-7.4.19-new/src/Makefile.shlib 2008-01-15 10:55:01.000000000 -0500
@@ -87,8 +87,24 @@
endif
ifeq ($(PORTNAME), darwin)
- shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LINK.shared = $(COMPILER) -bundle
+ ifeq (,$(filter $(host_os), darwin1.0 darwin1.1 darwin1.2))
+ DARWIN_LINKFLAGS =
+ else
+ DARWIN_LINKFLAGS = -multiply_defined suppress
+ endif
+
+ shlib := lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
+ ifneq ($(SO_MAJOR_VERSION), 0)
+ version_link := -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ endif
+ ifeq ($(DLTYPE), module)
+ DLSUFFIX := .so
+ LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress -flat_namespace
+ else
+ DLSUFFIX := .dylib
+ LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -install_name $(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) $(version_link) -dynamiclib $(DARWIN_LINKFLAGS)
+ endif
+ SHLIB_LINK := -L$(libpq_builddir) $(SHLIB_LINK)
endif
ifeq ($(PORTNAME), openbsd)
@@ -254,6 +270,7 @@
ifneq ($(PORTNAME), beos)
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), aix)
+ifneq ($(PORTNAME), darwin)
# Normal case
$(shlib): $(OBJS)
@@ -269,6 +286,25 @@
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
endif
+else # PORTNAME == darwin
+
+# Darwin case
+# (same as normal case, but libfoo.version.suffix)
+
+$(shlib): $(OBJS)
+ $(LINK.shared) $(OBJS) $(SHLIB_LINK) -o $@
+ifneq ($(shlib), lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX))
+ rm -f lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
+ $(LN_S) $(shlib) lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
+endif
+
+ifneq ($(shlib), lib$(NAME)$(DLSUFFIX))
+ rm -f lib$(NAME)$(DLSUFFIX)
+ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
+endif
+
+endif # PORTNAME == darwin
+
else # PORTNAME == aix
# AIX case
@@ -321,6 +357,7 @@
install-lib-shared: $(shlib)
$(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib)
ifneq ($(PORTNAME), cygwin)
+ifneq ($(PORTNAME), darwin)
ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION))
cd $(DESTDIR)$(libdir) && \
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) && \
@@ -331,7 +368,18 @@
rm -f lib$(NAME)$(DLSUFFIX) && \
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
endif
-
+else
+ifneq ($(shlib), lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX))
+ cd $(DESTDIR)$(libdir) && \
+ rm -f lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) && \
+ $(LN_S) $(shlib) lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
+endif
+ifneq ($(shlib), lib$(NAME)$(DLSUFFIX))
+ cd $(DESTDIR)$(libdir) && \
+ rm -f lib$(NAME)$(DLSUFFIX) && \
+ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
+endif
+endif # not darwin
endif # not cygwin
endif # enable_shared
@@ -346,7 +394,9 @@
ifeq ($(enable_shared), yes)
rm -f $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX) \
$(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) \
- $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) \
+ $(DESTDIR)$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) \
+ $(DESTDIR)$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
endif # enable_shared
@@ -358,7 +408,7 @@
clean-lib:
rm -f lib$(NAME).a
ifeq ($(enable_shared), yes)
- rm -f lib$(NAME)$(DLSUFFIX) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ rm -f lib$(NAME)$(DLSUFFIX) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
ifdef EXPSUFF
rm -f lib$(NAME)$(EXPSUFF)
endif
--- postgresql-7.4.19/src/backend/main/main.c 2006-01-04 19:55:23.000000000 -0500
+++ postgresql-7.4.19-new/src/backend/main/main.c 2008-01-15 10:55:01.000000000 -0500
@@ -51,6 +51,7 @@
int len;
struct passwd *pw;
char *pw_name_persist;
+ char *progname;
/*
* Place platform-specific startup hacks here. This is the right
@@ -214,9 +215,27 @@
* argument) we were called with. The lack of consistency here is
* historical.
*/
- len = strlen(new_argv[0]);
- if (len >= 10 && strcmp(new_argv[0] + len - 10, "postmaster") == 0)
+ /*
+ * Find the program name, which is after the final slash in the
+ * program argument.
+ */
+ progname = strrchr(new_argv[0], '/');
+ if (progname != NULL)
+ {
+ progname = progname + 1;
+ }
+ else
+ {
+ progname = new_argv[0];
+ }
+
+ /*
+ * Now check if the program name starts with the
+ * word "postmaster", in which case PostmasterMain is called.
+ */
+ len = strlen(progname);
+ if (len >= 10 && strncmp(progname, "postmaster", 10) == 0)
{
/* Called as "postmaster" */
exit(PostmasterMain(argc, new_argv));
--- postgresql-7.4.19/src/backend/utils/fmgr/dfmgr.c 2003-09-25 02:58:05.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/fmgr/dfmgr.c 2008-01-15 10:55:01.000000000 -0500
@@ -300,6 +300,26 @@
pfree(full);
}
+ new = palloc(strlen(name) + strlen(".so") + 1);
+ strcpy(new, name);
+ strcat(new, ".so");
+
+ if (!have_slash)
+ {
+ full = find_in_dynamic_libpath(new);
+ pfree(new);
+ if (full)
+ return full;
+ }
+ else
+ {
+ full = substitute_libpath_macro(new);
+ pfree(new);
+ if (file_exists(full))
+ return full;
+ pfree(full);
+ }
+
new = palloc(strlen(name) + strlen(DLSUFFIX) + 1);
strcpy(new, name);
strcat(new, DLSUFFIX);
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile 2002-08-21 22:18:45.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.3 2002/08/22 02:18:45 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/ascii_and_mic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/cyrillic_and_mic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/euc_cn_and_mic/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/euc_cn_and_mic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/euc_cn_and_mic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/euc_jp_and_sjis
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/euc_kr_and_mic/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/euc_kr_and_mic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/euc_kr_and_mic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/euc_tw_and_big5
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/latin2_and_win1250/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/latin2_and_win1250/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/latin2_and_win1250
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/latin_and_mic/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/latin_and_mic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/latin_and_mic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_ascii
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_big5/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_big5/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_big5
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_cyrillic
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_euc_cn
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_euc_jp
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_euc_kr
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_euc_tw
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_gb18030
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_gbk/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_gbk/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_gbk
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_iso8859
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_johab/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_johab/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_johab
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_sjis/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_sjis/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_sjis
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_tcvn
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_uhc/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_uhc/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_uhc
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_win1250/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_win1250/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_win1250
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_win1256/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_win1256/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_win1256
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/mb/conversion_procs/utf8_and_win874/Makefile 2002-08-21 17:33:55.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/mb/conversion_procs/utf8_and_win874/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -3,6 +3,9 @@
# $Id: Makefile,v 1.2 2002/08/21 21:33:55 momjian Exp $
#
#-------------------------------------------------------------------------
+
+DLTYPE = module
+
subdir = src/backend/utils/mb/conversion_procs/utf8_and_win874
top_builddir = ../../../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/backend/utils/misc/postgresql.conf.sample 2006-05-21 16:11:58.000000000 -0400
+++ postgresql-7.4.19-new/src/backend/utils/misc/postgresql.conf.sample 2008-01-15 10:55:01.000000000 -0500
@@ -27,7 +27,7 @@
# - Connection Settings -
-#tcpip_socket = false
+tcpip_socket = true
#max_connections = 100
# note: increasing max_connections costs about 500 bytes of shared
# memory per connection slot, in addition to costs from shared_buffers
@@ -43,7 +43,7 @@
# - Security & Authentication -
#authentication_timeout = 60 # 1-600, in seconds
-#ssl = false
+ssl = false
#password_encryption = true
#krb_server_keyfile = ''
#db_user_namespace = false
--- postgresql-7.4.19/src/bin/initdb/initdb.sh 2004-05-05 12:09:56.000000000 -0400
+++ postgresql-7.4.19-new/src/bin/initdb/initdb.sh 2008-01-15 10:55:01.000000000 -0500
@@ -123,20 +123,20 @@
# their trees to backup places, so $bindir might be inaccurate.
if [ x"$self_path" != x"" ] \
- && [ -x "$self_path/postgres" ] \
- && [ x"`$self_path/postgres -V 2>/dev/null`" = x"postgres (PostgreSQL) $VERSION" ]
+ && [ -x "$self_path/postgres-7.4" ] \
+ && [ x"`$self_path/postgres-7.4 -V 2>/dev/null`" = x"postgres (PostgreSQL) $VERSION" ]
then
PGPATH=$self_path
-elif [ -x "$bindir/postgres" ]; then
- if [ x"`$bindir/postgres -V 2>/dev/null`" = x"postgres (PostgreSQL) $VERSION" ]
+elif [ -x "$bindir/postgres-7.4" ]; then
+ if [ x"`$bindir/postgres-7.4 -V 2>/dev/null`" = x"postgres (PostgreSQL) $VERSION" ]
then
PGPATH=$bindir
else
# Maybe there was an error message?
- errormsg=`$bindir/postgres -V 2>&1 >/dev/null`
+ errormsg=`$bindir/postgres-7.4 -V 2>&1 >/dev/null`
(
echo "The program "
- echo " $bindir/postgres"
+ echo " $bindir/postgres-7.4"
echo "needed by $CMDNAME does not belong to PostgreSQL version $VERSION, or"
echo "there may be a configuration problem."
if test x"$errormsg" != x""; then
@@ -148,7 +148,7 @@
exit 1
fi
else
- echo "The program \"postgres\" is needed by $CMDNAME but was not found in" 1>&2
+ echo "The program \"postgres-7.4\" is needed by $CMDNAME but was not found in" 1>&2
echo "the directory \"$bindir\". Check your installation." 1>&2
exit 1
fi
@@ -156,20 +156,20 @@
# Now we can assume that 'pg_id' belongs to the same version as the
# verified 'postgres' in the same directory.
-if [ ! -x "$PGPATH/pg_id" ]; then
- echo "The program \"pg_id\" is needed by $CMDNAME but was not found in" 1>&2
+if [ ! -x "$PGPATH/pg_id-7.4" ]; then
+ echo "The program \"pg_id-7.4\" is needed by $CMDNAME but was not found in" 1>&2
echo "the directory \"$PGPATH\". Check your installation." 1>&2
exit 1
fi
-EffectiveUser=`$PGPATH/pg_id -n -u`
+EffectiveUser=`$PGPATH/pg_id-7.4 -n -u`
if [ -z "$EffectiveUser" ]; then
echo "$CMDNAME: could not determine current user name" 1>&2
exit 1
fi
-if [ `$PGPATH/pg_id -u` -eq 0 ]
+if [ `$PGPATH/pg_id-7.4 -u` -eq 0 ]
then
echo "$CMDNAME: cannot be run as root" 1>&2
echo "Please log in (using, e.g., \"su\") as the (unprivileged) user that will" 1>&2
@@ -372,11 +372,11 @@
if [ "$ENCODING" ]
then
- ENCODINGID=`$PGPATH/pg_encoding -b $ENCODING`
+ ENCODINGID=`$PGPATH/pg_encoding-7.4 -b $ENCODING`
if [ "$?" -ne 0 ]
then
(
- echo "$CMDNAME: pg_encoding failed"
+ echo "$CMDNAME: pg_encoding-7.4 failed"
echo "Make sure the program was installed correctly."
) 1>&2
exit 1
@@ -565,7 +565,7 @@
do
nbuffers=`expr $nconns '*' 5`
TEST_OPT="$PGSQL_OPT -c shared_buffers=$nbuffers -c max_connections=$nconns"
- if "$PGPATH"/postgres -boot -x0 $TEST_OPT template1 /dev/null 2>&1
+ if "$PGPATH"/postgres-7.4 -boot -x0 $TEST_OPT template1 /dev/null 2>&1
then
break
fi
@@ -578,7 +578,7 @@
for nbuffers in 1000 900 800 700 600 500 400 300 200 100 50
do
TEST_OPT="$PGSQL_OPT -c shared_buffers=$nbuffers -c max_connections=$nconns"
- if "$PGPATH"/postgres -boot -x0 $TEST_OPT template1 /dev/null 2>&1
+ if "$PGPATH"/postgres-7.4 -boot -x0 $TEST_OPT template1 /dev/null 2>&1
then
break
fi
@@ -639,7 +639,7 @@
export LC_COLLATE
export LC_CTYPE
unset LC_ALL
- "$PGPATH"/postgres -boot -x1 $PGSQL_OPT $BOOTSTRAP_TALK_ARG template1
+ "$PGPATH"/postgres-7.4 -boot -x1 $PGSQL_OPT $BOOTSTRAP_TALK_ARG template1
) \
|| exit_nicely
@@ -661,7 +661,7 @@
$ECHO_N "initializing pg_shadow... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
-- to the flat password/group files pg_pwd and pg_group
CREATE TRIGGER pg_sync_pg_pwd AFTER INSERT OR UPDATE OR DELETE ON pg_shadow \
@@ -694,7 +694,7 @@
exit_nicely
fi
$ECHO_N "setting password... "$ECHO_C
- "$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
EOF
if [ "$?" -ne 0 ]; then
@@ -710,7 +710,7 @@
$ECHO_N "enabling unlimited row size for system tables... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
ALTER TABLE pg_constraint CREATE TOAST TABLE;
ALTER TABLE pg_database CREATE TOAST TABLE;
@@ -729,7 +729,7 @@
$ECHO_N "initializing pg_depend... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
-- that the dependency code handles. This is overkill (the system doesn't
-- really depend on having every last weird datatype, for instance)
@@ -761,7 +761,7 @@
$ECHO_N "creating system views... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
CREATE VIEW pg_user AS \
SELECT \
@@ -1051,12 +1051,12 @@
FROM tmp_pg_description t, pg_class c WHERE c.relname = t.classname;
EOF
) \
- | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
+ | "$PGPATH"/postgres-7.4 $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
# Create pg_conversion and support functions
$ECHO_N "creating conversions... "$ECHO_C
-grep -v '^DROP CONVERSION' $datadir/conversion_create.sql | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
+grep -v '^DROP CONVERSION' $datadir/conversion_create.sql | "$PGPATH"/postgres-7.4 $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
# Set most system catalogs and built-in functions as world-accessible.
@@ -1076,11 +1076,11 @@
GRANT CREATE, USAGE ON SCHEMA public TO PUBLIC;
EOF
) \
- | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
+ | "$PGPATH"/postgres-7.4 $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
$ECHO_N "creating information schema... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT -N template1 > /dev/null < "$datadir"/information_schema.sql || exit_nicely
+"$PGPATH"/postgres-7.4 $PGSQL_OPT -N template1 > /dev/null < "$datadir"/information_schema.sql || exit_nicely
(
# Format version number to format required by information schema (09.08.0007abc).
major_version=`echo $VERSION | sed 's/^\([0-9]*\).*/00\1/;s/.*\(..\)$/\1/'`
@@ -1093,12 +1093,12 @@
echo "COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported, comments) FROM '$datadir/sql_features.txt';"
) \
- | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
+ | "$PGPATH"/postgres-7.4 $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
$ECHO_N "vacuuming database template1... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
VACUUM FULL FREEZE;
EOF
@@ -1109,7 +1109,7 @@
$ECHO_N "copying template1 to template0... "$ECHO_C
-"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <
UPDATE pg_database SET \
@@ -1145,11 +1145,7 @@
echo
echo "Success. You can now start the database server using:"
echo ""
-echo " $PGPATH/postmaster -D $PGDATA"
-echo "or"
-# (Advertise -l option here, otherwise we have a background
-# process writing to the terminal.)
-echo " $PGPATH/pg_ctl -D $PGDATA -l logfile start"
+echo " sudo @INSTPREFIX@/bin/pgsql.sh-7.4 start"
echo
exit 0
--- postgresql-7.4.19/src/bin/initlocation/initlocation.sh 2003-07-23 04:46:57.000000000 -0400
+++ postgresql-7.4.19-new/src/bin/initlocation/initlocation.sh 2008-01-15 10:55:01.000000000 -0500
@@ -163,7 +163,7 @@
echo "You can now create a database using"
echo " CREATE DATABASE
echo "in SQL, or"
- echo " createdb -D '$Location'
+ echo " createdb-7.4 -D '$Location'
echo "from the shell."
fi
echo
--- postgresql-7.4.19/src/bin/pg_ctl/pg_ctl.sh 2004-10-21 20:24:27.000000000 -0400
+++ postgresql-7.4.19-new/src/bin/pg_ctl/pg_ctl.sh 2008-01-15 10:55:01.000000000 -0500
@@ -14,6 +14,10 @@
CMDNAME=`basename $0`
+ulimit -d 24000 >/dev/null 2>&1
+ulimit -n 512 >/dev/null 2>&1
+ulimit -s 4096 >/dev/null 2>&1
+
help="\
$CMDNAME is a utility to start, stop, restart, reload configuration files,
or report the status of a PostgreSQL server.
@@ -98,20 +102,20 @@
fi
# Check if needed programs actually exist in path
-if [ -x "$self_path/postmaster" ] && [ -x "$self_path/psql" ]; then
+if [ -x "$self_path/postmaster-7.4" ] && [ -x "$self_path/psql-7.4" ]; then
PGPATH="$self_path"
-elif [ -x "$bindir/postmaster" ] && [ -x "$bindir/psql" ]; then
+elif [ -x "$bindir/postmaster-7.4" ] && [ -x "$bindir/psql-7.4" ]; then
PGPATH="$bindir"
else
- echo "The programs \"postmaster\" and \"psql\" are needed by $CMDNAME but" 1>&2
+ echo "The programs \"postmaster-7.4\" and \"psql-7.4\" are needed by $CMDNAME but" 1>&2
echo "were not found in the directory \"$bindir\"." 1>&2
echo "Check your installation." 1>&2
exit 1
fi
-po_path="$PGPATH/postmaster"
+po_path="$PGPATH/postmaster-7.4"
-if [ `$PGPATH/pg_id -u` -eq 0 ]
+if [ `$PGPATH/pg_id-7.4 -u` -eq 0 ]
then
echo "$CMDNAME: cannot be run as root" 1>&2
echo "Please log in (using, e.g., \"su\") as the (unprivileged) user that will" 1>&2
@@ -397,7 +401,7 @@
$silence_echo $ECHO_N "waiting for postmaster to start..."$ECHO_C
while :
do
- if "$PGPATH/psql" -p $PGPORT -l >/dev/null 2>&1
+ if "$PGPATH/psql-7.4" -p $PGPORT -l >/dev/null 2>&1
then
break;
else
--- postgresql-7.4.19/src/include/port/darwin.h 2001-10-28 01:26:08.000000000 -0500
+++ postgresql-7.4.19-new/src/include/port/darwin.h 2008-01-15 10:55:01.000000000 -0500
@@ -1,8 +1,6 @@
#define __darwin__ 1
-#if defined(__ppc__)
#define HAS_TEST_AND_SET
-#endif
#if defined(__ppc__)
typedef unsigned int slock_t;
--- postgresql-7.4.19/src/interfaces/ecpg/compatlib/Makefile 2004-03-14 07:18:35.000000000 -0500
+++ postgresql-7.4.19-new/src/interfaces/ecpg/compatlib/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -17,6 +17,8 @@
SO_MINOR_VERSION= 2
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) $(THREAD_CPPFLAGS)
+override LDFLAGS := -L../../../../src/port -L@BUILDDIR@@INSTPREFIX@@FINKPREFIX@/lib -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) $(LDFLAGS)
+
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(THREAD_LIBS)
--- postgresql-7.4.19/src/interfaces/ecpg/ecpglib/Makefile 2005-07-16 16:39:24.000000000 -0400
+++ postgresql-7.4.19-new/src/interfaces/ecpg/ecpglib/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -17,6 +17,7 @@
SO_MINOR_VERSION= 1
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS)
+override LDFLAGS := -L@BUILDDIR@@INSTPREFIX@@FINKPREFIX@/lib -L../pgtypeslib -lpgtypes $(libpq) -L../../../../src/port $(LDFLAGS)
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
connect.o misc.o path.o
--- postgresql-7.4.19/src/makefiles/Makefile.darwin 2003-10-27 02:42:34.000000000 -0500
+++ postgresql-7.4.19-new/src/makefiles/Makefile.darwin 2008-01-15 10:55:01.000000000 -0500
@@ -1,13 +1,28 @@
AROPT = crs
AWK= awk
-DLSUFFIX = .so
-CFLAGS_SL =
+ifeq ($(DLTYPE), module)
+ DLSUFFIX := .so
BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
+else
+ DLSUFFIX := .dylib
+ BE_DLLLIBS=
+endif
+
+CFLAGS_SL =
+CFLAGS += -fno-common
+
+ifeq (,$(filter $(host_os), darwin1.0 darwin1.1 darwin1.2))
+ DARWIN_LINKFLAGS=
+else
+ DARWIN_LINKFLAGS=-multiply_defined suppress
+endif
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
%.so: %.o
- $(CC) -bundle -o $@ $< $(BE_DLLLIBS)
+ $(CC) -bundle $(DARWIN_LINKFLAGS) -o $@ $< $(BE_DLLLIBS)
+%.dylib: %.o
+ $(CC) -dynamiclib $(DARWIN_LINKFLAGS) -o $@ $<
sqlmansect = 7
--- postgresql-7.4.19/src/pl/plperl/GNUmakefile 2004-01-21 14:25:11.000000000 -0500
+++ postgresql-7.4.19-new/src/pl/plperl/GNUmakefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,13 +1,13 @@
# Makefile for PL/Perl
# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.10.6.1 2004/01/21 19:25:11 tgl Exp $
+DLTYPE = module
+
subdir = src/pl/plperl
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-ifeq ($(perl_useshrplib),true)
shared_libperl = yes
-endif
# If we don't have a shared library and the platform doesn't allow it
# to work without, we have to skip it.
--- postgresql-7.4.19/src/pl/plpgsql/Makefile 2001-05-24 18:33:18.000000000 -0400
+++ postgresql-7.4.19-new/src/pl/plpgsql/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -8,6 +8,8 @@
#
#-------------------------------------------------------------------------
+DLTYPE = module
+
subdir = src/pl/plpgsql
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/pl/plpgsql/src/Makefile 2004-02-10 02:26:48.000000000 -0500
+++ postgresql-7.4.19-new/src/pl/plpgsql/src/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -6,6 +6,8 @@
#
#-------------------------------------------------------------------------
+DLTYPE = module
+
subdir = src/pl/plpgsql/src
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
@@ -20,6 +22,7 @@
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override LDFLAGS := $(libpq) $(LDFLAGS)
SHLIB_LINK = $(filter -lintl, $(LIBS)) $(BE_DLLLIBS)
rpath :=
--- postgresql-7.4.19/src/pl/plpython/Makefile 2004-01-21 14:25:11.000000000 -0500
+++ postgresql-7.4.19-new/src/pl/plpython/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.11.6.1 2004/01/21 19:25:11 tgl Exp $
+DLTYPE = module
+
subdir = src/pl/plpython
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
@@ -8,13 +10,12 @@
# On some platforms we can only build PL/Python if libpython is a
# shared library. Since there is no official way to determine this,
# we see if there is a file that is named like a shared library.
-ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
+ifneq (,$(wildcard $(python_configdir)/libpython*.dylib*))
shared_libpython = yes
endif
# If we don't have a shared library and the platform doesn't allow it
# to work without, we have to skip it.
-ifneq (,$(findstring yes, $(shared_libpython)$(allow_nonpic_in_shlib)))
override CPPFLAGS := -I$(srcdir) $(python_includespec) $(CPPFLAGS)
rpath :=
@@ -32,13 +33,7 @@
all: all-lib
install: all installdirs
-ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
-else
- @echo "*****"; \
- echo "* PL/Python was not installed due to lack of shared library support."; \
- echo "*****"
-endif
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
@@ -53,13 +48,3 @@
installcheck:
PATH=$(bindir):$$PATH $(SHELL) $(srcdir)/test.sh
-else # can't build
-
-all:
- @echo ""; \
- echo "*** Cannot build PL/Python because libpython is not a shared library." ; \
- echo "*** You might have to rebuild your Python installation. Refer to"; \
- echo "*** the documentation for details."; \
- echo ""
-
-endif # can't build
--- postgresql-7.4.19/src/pl/tcl/Makefile 2004-01-21 14:25:11.000000000 -0500
+++ postgresql-7.4.19-new/src/pl/tcl/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -6,6 +6,8 @@
#
#-------------------------------------------------------------------------
+DLTYPE = module
+
subdir = src/pl/tcl
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/pl/tcl/modules/Makefile 2002-01-08 18:40:02.000000000 -0500
+++ postgresql-7.4.19-new/src/pl/tcl/modules/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/src/pl/tcl/modules/Makefile,v 1.2 2002/01/08 23:40:02 tgl Exp $
+DLTYPE = module
+
subdir = src/pl/tcl/modules
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/src/template/darwin 2004-07-08 14:25:22.000000000 -0400
+++ postgresql-7.4.19-new/src/template/darwin 2008-01-15 10:55:01.000000000 -0500
@@ -1,10 +1,13 @@
-# Apple's cpp-precomp seems a tad broken, so don't use it
-# (Note: on OS X before 10.2, you might need -traditional-cpp instead)
-CC="$CC -no-cpp-precomp"
-
# Select appropriate semaphore support
USE_NAMED_POSIX_SEMAPHORES=1
+# tools/thread/thread_test must be run
+THREAD_SUPPORT=yes
+THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
+THREAD_LIBS="-lpthread"
+
+NEED_REENTRANT_FUNCS=yes
+
THREAD_SUPPORT=yes
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"
Package: postgresql74-unified
Version: 7.4.22
Revision: 1
Description: PostgreSQL open-source database
License: BSD
Maintainer: Benjamin Reed
Depends: <<
fink-obsolete-packages,
daemonic (>= 20010902-1),
libxml2-shlibs,
libxslt-shlibs,
passwd (>= 20030906-1),
readline5-shlibs,
%N-shlibs (>= %v-%r)
<<
BuildDepends: <<
bison,
fink (>= 0.28.0-1),
libxml2,
libxslt,
passwd (>= 20030906-1),
readline5,
system-openssl-dev
<<
Provides: postgresql-server
Conflicts: <<
postgresql (<< %v-%r),
postgresql-ssl (<< %v-%r)
<<
Replaces: <<
postgresql (<< %v-%r),
postgresql-ssl (<< %v-%r),
postgresql-shlibs,
postgresql-ssl-shlibs,
postgresql-python,
postgresql-ssl-python,
postgresql-perl,
postgresql-ssl-perl,
postgresql73,
postgresql73-ssl,
postgresql74 (<< %v-%r),
postgresql74-ssl (<< %v-%r)
<<
CustomMirror: <<
afr-ZA: ftp://ftp.za.postgresql.org/mirror/ftp.postgresql.org
asi-CN: ftp://ftp.cn.postgresql.org/ftp.postgresql.org
asi-GE: ftp://ftp.ge.postgresql.org/pub/postgresql
asi-HK: ftp://ftp.hk.postgresql.org/postgresql
asi-ID: ftp://ftp8.id.postgresql.org/pub/PostgreSQL
asi-ID: ftp://ftp9.id.postgresql.org/postgresql
asi-JP: ftp://ftp.jp.postgresql.org
asi-KR: ftp://ftp.kr.postgresql.org/mirror/database/postgresql
asi-TW: ftp://ftp.tw.postgresql.org/pub/postgresql
asi-TW: ftp://ftp3.tw.postgresql.org/pub/postgresql
asi-TW: ftp://ftp5.tw.postgresql.org/pub/Unix/Database/PostgreSQL
aus-AU: ftp://ftp.au.postgresql.org/pub/postgresql
aus-AU: ftp://ftp2.au.postgresql.org/pub/postgresql
aus-AU: ftp://ftp3.au.postgresql.org/pub/postgresql
aus-NZ: ftp://ftp.nz.postgresql.org/postgresql
eur-AT: ftp://ftp.at.postgresql.org/db/www.postgresql.org/pub
eur-BE: ftp://ftp.be.postgresql.org/postgresql
eur-BA: ftp://ftp.ba.postgresql.org/pub/postgresql
eur-BG: ftp://ftp3.bg.postgresql.org/postgresql
eur-CH: ftp://ftp2.ch.postgresql.org/mirror/postgresql
eur-CZ: ftp://ftp.cz.postgresql.org/pub/ftp.postgresql.org
eur-CZ: ftp://ftp2.cz.postgresql.org/pub/postgresql
eur-DE: ftp://ftp.de.postgresql.org/mirror/postgresql
eur-DE: ftp://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org
eur-DE: ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org
eur-DE: ftp://ftp8.de.postgresql.org/pub/misc/pgsql
eur-DE: ftp://ftp9.de.postgresql.org/unix/databases/postgresql
eur-DK: ftp://ftp.dk.postgresql.org/mirrors/postgresql
eur-EE: ftp://ftp.ee.postgresql.org/mirrors/postgresql
eur-ES: ftp://ftp5.es.postgresql.org/mirror/postgresql
eur-FR: ftp://ftp.fr.postgresql.org
eur-FR: ftp://ftp2.fr.postgresql.org/postgresql
eur-FR: ftp://ftp3.fr.postgresql.org/pub/postgresql
eur-GR: ftp://ftp.gr.postgresql.org/pub/databases/postgresql
eur-GR: ftp://ftp2.gr.postgresql.org/pub/databases/postgresql
eur-HR: ftp://ftp.hr.postgresql.org/postgresql
eur-HU: ftp://ftp3.hu.postgresql.org/pub/postgresql
eur-IE: ftp://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub
eur-IE: ftp://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org
eur-IL: ftp://ftp.il.postgresql.org/ftp.postgresql.org
eur-IS: ftp://ftp.is.postgresql.org/pub/postgresql
eur-IT: ftp://ftp2.it.postgresql.org/mirrors/postgres
eur-IT: ftp://ftp6.it.postgresql.org/pub/PostgreSQL
eur-IT: ftp://ftp7.it.postgresql.org/pub/unix/postgres
eur-LV: ftp://ftp.lv.postgresql.org/pub/software/postgresql
eur-NL: ftp://ftp.eu.postgresql.org/pub/unix/db/postgresql
eur-NL: ftp://ftp.nl.postgresql.org:21/pub/mirror/postgresql
eur-NL: ftp://ftp2.nl.postgresql.org/mirror/postgresql
eur-NL: ftp://ftp4.nl.postgresql.org/postgresql.zeelandnet.nl
eur-NO: ftp://ftp.no.postgresql.org/pub/databases/postgresql
eur-PL: ftp://ftp6.pl.postgresql.org/pub/postgresql
eur-PL: ftp://ftp7.pl.postgresql.org/pub/mirror/ftp.postgresql.org
eur-PL: ftp://ftp8.pl.postgresql.org/pub/postgresql
eur-PT: ftp://ftp.pt.postgresql.org/postgresql
eur-RO: ftp://ftp6.ro.postgresql.org/pub/mirrors/ftp.postgresql.org
eur-RU: ftp://ftp.ru.postgresql.org/pub/mirrors/pgsql
eur-RU: ftp://ftp2.ru.postgresql.org/pub/databases/postgresql
eur-RU: ftp://ftp3.ru.postgresql.org/pub/mirror/postgresql/pub
eur-RU: ftp://ftp6.ru.postgresql.org/pub/pgsql
eur-SE: ftp://ftp.se.postgresql.org/pub/database/relational/postgresql
eur-SK: ftp://ftp2.sk.postgresql.org/pub/postgresql
eur-UK: ftp://ftp2.uk.postgresql.org/sites/ftp.postgresql.org
eur-UK: ftp://ftp4.uk.postgresql.org/sites/ftp.postgresql.org
eur-UK: ftp://ftp8.uk.postgresql.org/sites/ftp.postgresql.org
nam-CA: ftp://ftp3.ca.postgresql.org/pub
nam-CA: ftp://ftp4.ca.postgresql.org/pub/postgresql
sam-BR: ftp://ftp.br.postgresql.org/pub/PostgreSQL
sam-CL: ftp://ftp.cl.postgresql.org/ftp/pub/postgresql
sam-CO: ftp://ftp.co.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp.us.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp3.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp4.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp5.us.postgresql.org/pub/PostgreSQL
nam-US: ftp://ftp8.us.postgresql.org/postgresql
nam-US: ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql
nam-US: ftp://ftp10.us.postgresql.org/pub/postgresql
nam-US: ftp://ftp22.us.postgresql.org/mirrors/ftp.postgresql.org
<<
Source: mirror:custom:source/v%v/postgresql-%v.tar.bz2
Source-MD5: aff2bbd26b753720da87ec7e4e26ee8d
PatchScript: sed -e 's|@BUILDDIR@|%b|g' -e 's|@INSTPREFIX@|%p|g' < %a/%n.patch | patch -p1
SetMAKEFLAGS: -j1
NoSetMAKEFLAGS: true
ConfigureParams: (%m = i386) --disable-spinlocks --prefix=%p --docdir=%p/share/doc --mandir=%p/share/man --enable-multibyte --enable-recode --with-CXX --without-perl --without-python --with-openssl --with-libraries=%p/lib --with-includes=%p/include --without-tcl --without-tk --without-java --enable-odbc --with-pam --with-rendezvous --enable-syslog --with-krb5=/usr
CompileScript: <<
#!/bin/sh -xe
export lt_cv_sys_max_cmd_len=65536
export CPPFLAGS="-I%p/lib/system-openssl/include -I%p/include -DHAVE_OPTRESET"
export LDFLAGS="-L%p/lib/system-openssl/lib -L%p/lib"
export SHELL="/bin/sh -xe"
PG_ID=`id -u postgres 2>/dev/null || true`
if [ -z "$PG_ID" ]; then
echo "Whoa there! You must have a postgres user to build this package."
echo "Please do a 'fink reinstall passwd' and make sure you hit 'y' when it"
echo "asks if you want to update your users."
exit 1
fi
# postgresql
perl -pi -e 's,hardcode_direct=yes,hardcode_direct=no,g' configure && \
./configure %c && \
make includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql && \
make -C contrib || exit 1
<<
InstallScript: <<
#!/bin/sh -xe
export SHELL="/bin/sh -xe"
# postgresql
make install install-all-headers includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql DESTDIR=%d INSTALLSITEMAN3DIR=%i/share/man/man3 || exit 10
make -C contrib install includedir=%p/include/postgresql includedir_internal=%p/include/postgresql/internal includedir_server=%p/include/postgresql DESTDIR=%d INSTALLSITEMAN3DIR=%i/share/man/man3
install -m 755 contrib/adddepend/adddepend %i/bin/adddepend
find %i/share -ls > /tmp/sharefiles-postgresql.txt
mv %i/share/doc/postgresql-7.4 %i/share/doc/%N >/dev/null 2>&1
ranlib %i/lib/*.a
install -d -m 755 %i/share/doc/%N
find contrib -name README.* -exec cp {} %i/share/doc/%N/ \;
install -d -m 755 %i/bin
install -c -m 755 pgsql.sh %i/bin/
install -d -m 755 %i/var/postgresql-7.4
echo "be sure to back up this database before any upgrades!" >> %i/var/postgresql-7.4/README
rm -rf %i/bin/postmaster
ln -sf postgres-7.4 %i/bin/postmaster
install -d -m 755 %i/var/log
ln -sf %p/var/postgresql-7.4/pgsql.log %i/var/log/pgsql-7.4.log
for libname in libecpg.4.1 libecpg_compat.1.2 libpgtypes.1.2 libpq.3.1; do
mv %i/lib/$libname.dylib %i/lib/$libname.dylib-7.4
done
rm -rf %i/lib/libecpg.*.dylib
rm -rf %i/lib/libecpg_compat.*.dylib
rm -rf %i/lib/libpgtypes.*.dylib
rm -rf %i/lib/libpq.*.dylib
for file in `ls -1 %i/bin/`; do
mv "%i/bin/${file}" "%i/bin/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/binary.list
install_name_tool -change %p/lib/libpq.3.dylib %p/lib/libpq.3.1.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg.4.dylib %p/lib/libecpg.4.1.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg_compat.1.dylib %p/lib/libecpg_compat.1.2.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libpgtypes.1.dylib %p/lib/libpgtypes.1.2.dylib "%i/bin/${file}-7.4" >/dev/null 2>&1 || :
done
for file in `find %i/lib -type f`; do
install_name_tool -change %p/lib/libpq.3.dylib %p/lib/libpq.3.1.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg.4.dylib %p/lib/libecpg.4.1.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libecpg_compat.1.dylib %p/lib/libecpg_compat.1.2.dylib "$file" >/dev/null 2>&1 || :
install_name_tool -change %p/lib/libpgtypes.1.dylib %p/lib/libpgtypes.1.2.dylib "$file" >/dev/null 2>&1 || :
done
for file in `ls -1 %i/share/man/man1/`; do
mv "%i/share/man/man1/${file}" "%i/share/man/man1/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/man1.list
done
for file in `ls -1 %i/share/man/man7/`; do
mv "%i/share/man/man7/${file}" "%i/share/man/man7/${file}-7.4"
echo "${file}" >> %i/var/postgresql-7.4/man7.list
done
cat <
#!/bin/sh
for arg in "\$@"; do
case \$arg in
-h|--h|--he|--hel|--help)
echo "usage: \$0 [-h]"
echo ""
echo " -h, --help this help"
echo ""
exit 0;
;;
*)
echo "\$0: unknown argument '\$arg'"
exit 1;
;;
esac
done
update-alternatives --remove "libecpg.4.1.dylib" "%p/lib/libecpg.4.1.dylib-7.4"
update-alternatives --remove "libecpg.4.dylib" "%p/lib/libecpg.4.1.dylib-7.4"
update-alternatives --remove "libecpg_compat.1.2.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4"
update-alternatives --remove "libecpg_compat.1.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4"
update-alternatives --remove "libpgtypes.1.2.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4"
update-alternatives --remove "libpgtypes.1.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4"
update-alternatives --remove "libpq.3.1.dylib" "%p/lib/libpq.3.1.dylib-7.4"
update-alternatives --remove "libpq.3.dylib" "%p/lib/libpq.3.1.dylib-7.4"
for tuple in %p/bin:binary.list %p/share/man/man1:man1.list %p/share/man/man7:man7.list; do
TUPLE_PATH=\`echo \$tuple | cut -d: -f1\`
TUPLE_FILE=\`echo \$tuple | cut -d: -f2\`
for file in \`cat %p/var/postgresql-7.4/\${TUPLE_FILE}\`; do
update-alternatives --remove "\${file}" "\${TUPLE_PATH}/\${file}-7.4"
done
done
END
cat <
#!/bin/sh
FORCE=0
for arg in "\$@"; do
case \$arg in
-h|--h|--he|--hel|--help)
echo "usage: \$0 [-h] [-f]"
echo ""
echo " -h, --help this help"
# echo " -f, --force force this version of PostgreSQL, even if there is a newer one"
echo ""
exit 0;
;;
# -f|--f|--fo|--for|--forc|--force)
# FORCE=1
# ;;
*)
echo "\$0: unknown argument '\$arg'"
exit 1;
;;
esac
done
if [ -e "%p/lib/libecpg.4.1.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libecpg.4.1.dylib" "libecpg.4.1.dylib" "%p/lib/libecpg.4.1.dylib-7.4" 0401000704
update-alternatives --install "%p/lib/libecpg.4.dylib" "libecpg.4.dylib" "%p/lib/libecpg.4.1.dylib-7.4" 0401000704
else
echo "WARNING: %p/lib/libecpg.4.1.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libecpg_compat.1.2.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libecpg_compat.1.2.dylib" "libecpg_compat.1.2.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4" 0102000704
update-alternatives --install "%p/lib/libecpg_compat.1.dylib" "libecpg_compat.1.dylib" "%p/lib/libecpg_compat.1.2.dylib-7.4" 0102000704
else
echo "WARNING: %p/lib/libecpg_compat.1.2.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libpgtypes.1.2.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libpgtypes.1.2.dylib" "libpgtypes.1.2.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4" 0102000704
update-alternatives --install "%p/lib/libpgtypes.1.dylib" "libpgtypes.1.dylib" "%p/lib/libpgtypes.1.2.dylib-7.4" 0102000704
else
echo "WARNING: %p/lib/libpgtypes.1.2.dylib-7.4 does not exist"
fi
if [ -e "%p/lib/libpq.3.1.dylib-7.4" ]; then
update-alternatives --install "%p/lib/libpq.3.1.dylib" "libpq.3.1.dylib" "%p/lib/libpq.3.1.dylib-7.4" 0301000704
update-alternatives --install "%p/lib/libpq.3.dylib" "libpq.3.dylib" "%p/lib/libpq.3.1.dylib-7.4" 0301000704
else
echo "WARNING: %p/lib/libpq.3.1.dylib-7.4 does not exist"
fi
for tuple in %p/bin:binary.list %p/share/man/man1:man1.list %p/share/man/man7:man7.list; do
TUPLE_PATH=\`echo \$tuple | cut -d: -f1\`
TUPLE_FILE=\`echo \$tuple | cut -d: -f2\`
for file in \`cat %p/var/postgresql-7.4/\${TUPLE_FILE}\`; do
if [ -e "\${TUPLE_PATH}/\${file}-7.4" ]; then
update-alternatives --install "\${TUPLE_PATH}/\${file}" "\${file}" "\${TUPLE_PATH}/\${file}-7.4" 74
fi
done
done
END
chmod 755 %i/var/postgresql-7.4/*.sh
perl -pi -e 's,^%d,,' %i/bin/pg_config*
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
SplitOff: <<
Package: %N-dev
Description: PostgreSQL development headers and libraries
Depends: <<
%N (>= %v-%r),
fink-obsolete-packages
<<
Conflicts: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev (<< %v-%r),
postgresql74-ssl-dev (<< %v-%r),
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
postgresql81-dev,
postgresql82-dev,
postgresql83-dev
<<
Replaces: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev,
postgresql74-ssl-dev,
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
%N (<< %v-%r),
postgresql81-dev,
postgresql82-dev,
postgresql83-dev
<<
BuildDependsOnly: true
Files: <<
bin/pg_config*
include
lib/*.a
lib/libecpg.dylib
lib/libecpg_compat.dylib
lib/libpgtypes.dylib
lib/libpq.dylib
share/man/man1/pg_config*
<<
PostInstScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
PreRmScript: [ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
PostRmScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
<<
SplitOff2: <<
Package: %N-shlibs
Description: PostgreSQL shared libraries
Conflicts: <<
postgresql74-shlibs (<< %v-%r),
postgresql74-ssl-shlibs (<< %v-%r)
<<
Replaces: <<
postgresql74 (<< %v-%r),
postgresql74-ssl (<< %v-%r),
postgresql73-shlibs,
postgresql73-ssl-shlibs,
postgresql73-unified-shlibs,
postgresql74-shlibs (<< %v-%r),
postgresql74-ssl-shlibs (<< %v-%r),
postgresql74-unified-shlibs (<< %v-%r),
postgresql,
postgresql-shlibs
<<
Files: lib/*.dylib* var/postgresql-7.4/*.sh var/postgresql-7.4/*.list
Shlibs: <<
%p/lib/libecpg.4.dylib 4.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libecpg_compat.1.dylib 1.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libpgtypes.1.dylib 1.0.0 postgresql74-unified-shlibs (>= 7.4.0-1)
%p/lib/libpq.3.dylib 3.0.0 postgresql73-unified-shlibs (>= 7.3.0-1) | postgresql74-unified-shlibs (>= 7.4.0-1)
<<
PostInstScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
PreRmScript: [ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
<<
SplitOff3: <<
Package: postgresql74
Description: upgrade package for postgresql74
Depends: <<
%N (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
<<
SplitOff4: <<
Package: postgresql74-shlibs
Description: upgrade package for postgresql74-shlibs
Depends: <<
%N-shlibs (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff5: <<
Package: postgresql74-dev
Description: upgrade package for postgresql74-dev
Depends: <<
%N-dev (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
BuildDependsOnly: true
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff6: <<
Package: postgresql74-ssl
Description: upgrade package for postgresql74-ssl
Depends: <<
%N (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
<<
SplitOff7: <<
Package: postgresql74-ssl-shlibs
Description: upgrade package for postgresql74-ssl-shlibs
Depends: <<
%N-shlibs (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
SplitOff8: <<
Package: postgresql74-ssl-dev
Description: upgrade package for postgresql74-ssl-dev
Depends: <<
%N-dev (>= %v-%r),
fink (>= 0.28.0-1),
fink-obsolete-packages
<<
BuildDependsOnly: true
DocFiles: COPYRIGHT HISTORY INSTALL README
<<
PostInstScript: <<
INSTALL_PHASE="$1"
[ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
# remove the old "pgsql" entries from netinfo; the username was switched to
# "postgres" but the old ones hang around because of the way niload works
niutil -destroy . /users/pgsql >/dev/null 2>&1 || true
niutil -destroy . /groups/pgsql >/dev/null 2>&1 || true
die () {
echo "failed"
echo ""
echo "*** bailing because an error ocurred:"
echo ""
echo "$*"
exit 1
}
# update daemonic init script if necessary
daemonic install %N
# get a nice port to run on
while true; do
PGPORT=$RANDOM;
if [ "$PGPORT" -gt 10000 ] && [ "$PGPORT" -lt 20000 ]; then
break
fi
done
export PGPORT
echo "- starting PostgreSQL on port $PGPORT"
if %p/bin/pgsql.sh-7.4 start >/tmp/pgstart-7.4.log 2>&1; then
sleep 5
ERROR=0
# install the plpgsql language if possible
printf -- "- attempting to install the plpgsql language in the template1 database... "
%p/bin/createlang-7.4 -U postgres -p $PGPORT plpgsql template1 >/tmp/createlang-7.4.log 2>&1 || ERROR="$?"
if [ $ERROR -eq 0 ]; then
echo "done"
elif [ $ERROR -gt 0 ] && [ $ERROR -ne 2 ]; then
echo "WARNING: an unknown error occurred inserting the plpgsql language"
else
:
fi
sleep 5
%p/bin/pgsql.sh-7.4 stop >/dev/null 2>&1 || echo "WARNING: unable to stop postgresql: run 'PGPORT=$PGPORT sudo %p/bin/pgsql.sh-7.4 stop' to try again"
else
cat <
If you wish to install it manually, run:
sudo %p/bin/pgsql.sh-7.4 start
sudo -u postgres %p/bin/createlang-7.4 plpgsql template1
END
fi
<<
PreRmScript: <<
[ -x %p/var/postgresql-7.4/remove-alternatives.sh ] && %p/var/postgresql-7.4/remove-alternatives.sh
# clean up
daemonic remove postgresql >/dev/null 2>&1 || true
daemonic remove postgresql74 >/dev/null 2>&1 || true
daemonic remove postgresql74-ssl >/dev/null 2>&1 || true
if [ $1 != "upgrade" ]; then
daemonic remove %N
fi
<<
PostRmScript: [ -x %p/var/postgresql-7.4/update-alternatives.sh ] && %p/var/postgresql-7.4/update-alternatives.sh
DaemonicFile: <<
<<
Homepage: http://www.postgresql.org/
DescUsage: <<
The package runs initdb on installation as the user 'postgres'.
The best way to run it is using the supplied pgsql.sh script, i.e.
'sudo pgsql.sh start'. Or, you can run
'sudo daemonic enable %N' as root to create a
StartupItem for it.
Unless you set up admin users in the database, the easiest way to
run psql commands with administrator access is to prefix them with
the command "sudo -u postgres". This will ask you your administrator
password, and then run the command as the postgres user.
For example, to create a new database, you would run:
sudo -u postgres createdb mydb
<<
DescPackaging: <<
IMPORTANT: The location of the data files has changed from early
revisions of this package. If you're upgrading from an earlier
revision, note that this one expects the data files to be installed
at
When run from the startup script, logs output to
<<
DescPort: <<
Rearranged a lot of the PostgreSQL build to be more "correct" on
Darwin, including making proper dylibs (instead of bundles, which
ended up creating static binaries).
<<
--- postgresql-7.4.19/contrib/Makefile 2003-09-11 13:15:27.000000000 -0400
+++ postgresql-7.4.19-new/contrib/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -37,7 +37,6 @@
string \
tablefunc \
tips \
- tsearch \
tsearch2 \
userlock \
vacuumlo
--- postgresql-7.4.19/contrib/btree_gist/Makefile 2003-03-20 13:59:18.000000000 -0500
+++ postgresql-7.4.19-new/contrib/btree_gist/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
+DLTYPE = module
subdir = contrib/btree_gist
+
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/chkpass/Makefile 2002-10-21 14:55:10.000000000 -0400
+++ postgresql-7.4.19-new/contrib/chkpass/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.4 2002/10/21 18:55:10 petere Exp $
+DLTYPE = module
+
subdir = contrib/chkpass
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/contrib-global.mk 2003-08-23 00:23:38.000000000 -0400
+++ postgresql-7.4.19-new/contrib/contrib-global.mk 2008-01-15 10:55:01.000000000 -0500
@@ -42,6 +42,9 @@
#
# Better look at some of the existing uses for examples...
+ifeq ($(DLTYPE), bundle)
+override DARWIN_LINKFLAGS := $(DARWIN_LINKFLAGS) -bundle_loader $(top_srcdir)/src/backend/postgres
+endif
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
--- postgresql-7.4.19/contrib/cube/Makefile 2003-09-13 21:52:25.000000000 -0400
+++ postgresql-7.4.19-new/contrib/cube/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.10 2003/09/14 01:52:25 tgl Exp $
+DLTYPE = module
+
subdir = contrib/cube
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dblink/Makefile 2002-09-14 16:28:54.000000000 -0400
+++ postgresql-7.4.19-new/contrib/dblink/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/dblink/Makefile,v 1.7 2002/09/14 20:28:54 tgl Exp $
+DLTYPE = module
+
subdir = contrib/dblink
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dbmirror/Makefile 2002-06-23 17:58:07.000000000 -0400
+++ postgresql-7.4.19-new/contrib/dbmirror/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/dbmirror/Attic/Makefile,v 1.1 2002/06/23 21:58:07 momjian Exp $
+DLTYPE = module
+
subdir = contrib/dbmirror
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/dbsize/Makefile 2002-02-22 18:05:35.000000000 -0500
+++ postgresql-7.4.19-new/contrib/dbsize/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/dbsize
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/earthdistance/Makefile 2002-09-19 23:47:22.000000000 -0400
+++ postgresql-7.4.19-new/contrib/earthdistance/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.12 2002/09/20 03:47:22 momjian Exp $
+DLTYPE = module
+
subdir = contrib/earthdistance
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/fulltextindex/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/fulltextindex/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/fulltextindex
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/fuzzystrmatch/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/fuzzystrmatch/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/fuzzystrmatch/Makefile,v 1.2 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/fuzzystrmatch
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/intagg/Makefile 2002-02-24 23:16:58.000000000 -0500
+++ postgresql-7.4.19-new/contrib/intagg/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -4,6 +4,8 @@
# by Mark L. Woodward
# $Header: /cvsroot/pgsql/contrib/intagg/Makefile,v 1.3 2002/02/25 04:16:58 tgl Exp $
+DLTYPE = module
+
subdir = contrib/intagg
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/intarray/Makefile 2003-06-11 14:44:14.000000000 -0400
+++ postgresql-7.4.19-new/contrib/intarray/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.9 2003/06/11 18:44:14 momjian Exp $
+DLTYPE = module
+
subdir = contrib/intarray
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/isbn_issn/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/isbn_issn/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/isbn_issn
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/lo/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/lo/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/lo
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/ltree/Makefile 2002-11-01 18:16:52.000000000 -0500
+++ postgresql-7.4.19-new/contrib/ltree/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/ltree
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/miscutil/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/miscutil/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.16 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/miscutil
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/noupdate/Makefile 2001-09-06 06:49:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/noupdate/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.9 2001/09/06 10:49:29 petere Exp $
+DLTYPE = module
+
subdir = contrib/noupdate
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/pgcrypto/Makefile 2001-09-30 18:18:29.000000000 -0400
+++ postgresql-7.4.19-new/contrib/pgcrypto/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -2,6 +2,9 @@
# $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.9 2001/09/30 22:18:29 momjian Exp $
#
+DLTYPE = module
+
+
subdir = contrib/pgcrypto
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/pgstattuple/Makefile 2001-09-30 21:52:38.000000000 -0400
+++ postgresql-7.4.19-new/contrib/pgstattuple/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -6,6 +6,8 @@
#
#-------------------------------------------------------------------------
+DLTYPE = module
+
subdir = contrib/pgstattuple
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/rserv/Makefile 2002-11-01 18:45:37.000000000 -0500
+++ postgresql-7.4.19-new/contrib/rserv/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,6 +1,8 @@
# Makefile for erServer demonstration implementation
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.
+DLTYPE = module
+
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/rtree_gist/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/rtree_gist/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/rtree_gist/Attic/Makefile,v 1.3 2001/09/06 10:49:30 petere Exp $
+DLTYPE = module
+
subdir = contrib/rtree_gist
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/seg/Makefile 2003-09-13 22:18:49.000000000 -0400
+++ postgresql-7.4.19-new/contrib/seg/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.10 2003/09/14 02:18:49 tgl Exp $
+DLTYPE = module
+
subdir = contrib/seg
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/spi/Makefile 2002-10-03 14:40:02.000000000 -0400
+++ postgresql-7.4.19-new/contrib/spi/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.22 2002/10/03 18:40:02 tgl Exp $
+DLTYPE = module
+
subdir = contrib/spi
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/string/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/string/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp $
+DLTYPE = module
+
subdir = contrib/string
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tablefunc/Makefile 2002-09-11 20:14:40.000000000 -0400
+++ postgresql-7.4.19-new/contrib/tablefunc/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,3 +1,5 @@
+DLTYPE = module
+
subdir = contrib/tablefunc
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tsearch/Makefile 2002-11-01 18:23:29.000000000 -0500
+++ postgresql-7.4.19-new/contrib/tsearch/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/tsearch/Attic/Makefile,v 1.3 2002/11/01 23:23:29 tgl Exp $
+DLTYPE = module
+
subdir = contrib/tsearch
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/tsearch2/Makefile 2003-08-26 06:01:02.000000000 -0400
+++ postgresql-7.4.19-new/contrib/tsearch2/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/tsearch2/Makefile,v 1.5 2003/08/26 10:01:02 teodor Exp $
+DLTYPE = module
+
subdir = contrib/tsearch2
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
--- postgresql-7.4.19/contrib/userlock/Makefile 2001-09-06 06:49:30.000000000 -0400
+++ postgresql-7.4.19-new/contrib/userlock/Makefile 2008-01-15 10:55:01.000000000 -0500
@@ -1,5 +1,7 @@
# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.16 2001/09/06 10:49:30 petere Exp