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

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

postgresql82: 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# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 101088 2013-01-04 05:59:00Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                    postgresql82-server
7version                 8.2.23
8categories              databases
9platforms               darwin
10maintainers             mww
11license                 Permissive
12description             run postgresql82 as server
13long_description        ${description}
14
15homepage                http://www.postgresql.org/
16master_sites            postgresql
17
18depends_run             port:postgresql82
19
20fetch   {}
21checksum        {}
22extract {}
23use_configure   no
24build   {}
25
26set libdir              ${prefix}/lib/postgresql82
27set dbdir               ${prefix}/var/db/postgresql82/defaultdb
28set logdir              ${prefix}/var/log/postgresql82
29set dbuser              postgres
30set dbgrp               postgres
31
32startupitem.create      yes
33startupitem.init        \
34        "PGCTL=${libdir}/bin/pg_ctl"
35startupitem.start       \
36        "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL82DATA:=${dbdir}} start -l ${logdir}/postgres.log\""
37startupitem.stop        \
38"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL82DATA:=${dbdir}} stop -s -m fast\""
39
40destroot {
41        addgroup ${dbgrp}
42        set gid [existsgroup ${dbgrp}]
43        adduser ${dbuser} shell=/bin/sh gid=${gid} \
44                home=${prefix}/var/db/postgresql82 \
45                realname=PostgreSQL-82\ Server
46        xinstall -m 755 -d ${destroot}${logdir}
47        system "touch ${destroot}${logdir}/postgres.log"
48        system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log"
49}
50
51post-install {
52        ui_msg "\nTo create a database instance, after install do\n\
53                sudo mkdir -p ${dbdir}\n\
54                sudo chown ${dbuser}:${dbgrp} ${dbdir}\n\
55                sudo su ${dbuser} -c \'${libdir}/bin/initdb -D ${dbdir}\'"
56        ui_msg "\nTo tweak your DBMS, consider increasing kern.sysv.shmmax\
57                by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf"
58}
59
60livecheck.type  none
Note: See TracBrowser for help on using the repository browser.