source: trunk/dports/databases/postgresql83-server/Portfile @ 30509

Last change on this file since 30509 was 30509, checked in by mww@…, 10 years ago

version 8.3beta2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1# $Id: Portfile 30509 2007-10-30 00:52:38Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    postgresql83-server
6version                 8.3beta2
7categories              databases
8platforms               darwin
9maintainers             mww jwa
10description             run postgresql83 as server
11long_description        ${description}
12
13homepage                http://www.postgresql.org/
14master_sites            postgresql
15
16depends_run             port:postgresql83
17
18fetch   {}
19checksum        {}
20extract {}
21configure       {}
22build   {}
23
24set libdir              ${prefix}/lib/postgresql83
25set dbdir               ${prefix}/var/db/postgresql83/defaultdb
26set logdir              ${prefix}/var/log/postgresql83
27set dbuser              postgres
28set dbgrp               postgres
29
30startupitem.create      yes
31startupitem.init        \
32        "PGCTL=${libdir}/bin/pg_ctl"
33startupitem.start       \
34        "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL83DATA:=${dbdir}} start -l ${logdir}/postgres.log\""
35startupitem.stop        \
36"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL83DATA:=${dbdir}} stop -s -m fast\""
37
38destroot {
39        addgroup ${dbgrp}
40        set gid [existsgroup ${dbgrp}]
41        adduser ${dbuser} shell=/bin/sh gid=${gid} \
42                home=${prefix}/var/db/postgresql83 \
43                realname=PostgreSQL-83\ Server
44        xinstall -m 755 -d ${destroot}${logdir}
45        system "touch ${destroot}${logdir}/postgres.log"
46        system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log"
47}
48
49post-install {
50        ui_msg "\nTo create a database instance, after install do\n\
51                sudo mkdir -p ${dbdir}\n\
52                sudo chown ${dbuser}:${dbgrp} ${dbdir}\n\
53                sudo su ${dbuser} -c \'${libdir}/bin/initdb -D ${dbdir}\'"
54        ui_msg "\nTo tweak your DBMS, consider increasing kern.sysv.shmmax\
55                by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf"
56}
57
58#livecheck.check        regex
59#livecheck.url  ${homepage}
60#livecheck.regex        v(8.3.\[0-9\]+)
61livecheck.check         moddate
62livecheck.url           http://www.postgresql.org/ftp/source/v8.3beta/
63
Note: See TracBrowser for help on using the repository browser.