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

Last change on this file was 154322, checked in by jwa@…, 13 months ago

postgresql93: version bump to 9.3.15

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 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 154322 2016-10-27 19:06:23Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                    postgresql93-server
7version                 9.3.15
8categories              databases
9platforms               darwin
10maintainers             mww jwa
11license                 Permissive
12description             run postgresql93 as server
13long_description        ${description}
14distfiles       
15
16homepage                http://www.postgresql.org/
17master_sites            postgresql
18
19depends_run             port:postgresql93
20
21use_configure   no
22build   {}
23
24set libdir              ${prefix}/lib/postgresql93
25set dbdir               ${prefix}/var/db/postgresql93/defaultdb
26set logdir              ${prefix}/var/log/postgresql93
27set dbuser              postgres
28set dbgrp               postgres
29
30add_users ${dbuser} shell=/bin/sh group=${dbgrp} \
31    home=${prefix}/var/db/postgresql93 \
32    realname=PostgreSQL-93\ Server
33
34startupitem.create      yes
35startupitem.init        \
36        "PGCTL=${libdir}/bin/pg_ctl"
37startupitem.start       \
38        "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL93DATA:=${dbdir}} start -l ${logdir}/postgres.log\""
39startupitem.stop        \
40"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL93DATA:=${dbdir}} stop -s -m fast\""
41
42destroot {
43        xinstall -m 755 -d ${destroot}${logdir}
44        system "touch ${destroot}${logdir}/postgres.log"
45        system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log"
46}
47
48notes "\nTo create a database instance, after install do\n\
49                sudo mkdir -p ${dbdir}\n\
50                sudo chown ${dbuser}:${dbgrp} ${dbdir}\n\
51                sudo su ${dbuser} -c \'${libdir}/bin/initdb -D ${dbdir}\' "
52
53livecheck.type  none
Note: See TracBrowser for help on using the repository browser.