# $Id$ PortSystem 1.0 name postgresql80-server version 8.0.26 categories databases platforms darwin maintainers mww jwa license Permissive description run postgresql80 as server long_description ${description} homepage http://www.postgresql.org/ master_sites postgresql depends_run port:postgresql80 fetch {} checksum {} extract {} use_configure no build {} set libdir ${prefix}/lib/postgresql80 set dbdir ${prefix}/var/db/postgresql80/defaultdb set logdir ${prefix}/var/log/postgresql80 set dbuser postgres80 set dbgrp postgres startupitem.create yes startupitem.init \ "PGCTL=${libdir}/bin/pg_ctl" startupitem.start \ "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL80DATA:=${dbdir}} start -l ${logdir}/postgres.log\"" startupitem.stop \ "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL80DATA:=${dbdir}} stop -s -m fast\"" destroot { addgroup ${dbgrp} set gid [existsgroup ${dbgrp}] adduser ${dbuser} shell=/bin/sh gid=${gid} \ home=${prefix}/var/db/postgresql80 \ realname=PostgreSQL-80\ Server xinstall -m 755 -d ${destroot}${logdir} system "touch ${destroot}${logdir}/postgres.log" system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log" } post-install { ui_msg "\nTo create a database instance, after install do\n\ sudo mkdir -p ${dbdir}\n\ sudo chown ${dbuser}:${dbgrp} ${dbdir}\n\ sudo su ${dbuser} -c \'${libdir}/bin/initdb -D ${dbdir}\'" ui_msg "\nTo tweak your DBMS, consider increasing kern.sysv.shmmax\ by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf" } livecheck.type none livecheck.url ${homepage} livecheck.regex (8.0.\[0-9\]+)