source: trunk/dports/databases/postgresql80-server/Portfile

Last change on this file was 101086, checked in by jwa@…, 5 years ago

postgresql80: drop maintainership (this is a bit moot, as this version is not developed anymore)

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