source: trunk/dports/databases/postgresql92-server/Portfile @ 97108

Last change on this file since 97108 was 97108, checked in by jwa@…, 8 years ago

postgresql92: version bump to 9.2 rc1, change distname due to upstream change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[90259]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
[67413]2# $Id: Portfile 97108 2012-08-27 19:33:20Z jwa@macports.org $
[66422]3
4PortSystem 1.0
5
[93114]6name                    postgresql92-server
[97108]7version                 9.2rc1
[66422]8categories              databases
9platforms               darwin
10maintainers             mww jwa
[85617]11license                 Permissive
[93114]12description             run postgresql92 as server
[66422]13long_description        ${description}
14
15homepage                http://www.postgresql.org/
16master_sites            postgresql
17
[93114]18depends_run             port:postgresql92
[66422]19
20fetch   {}
21checksum        {}
22extract {}
23use_configure   no
24build   {}
25
[93114]26set libdir              ${prefix}/lib/postgresql92
27set dbdir               ${prefix}/var/db/postgresql92/defaultdb
28set logdir              ${prefix}/var/log/postgresql92
[66422]29set dbuser              postgres
30set dbgrp               postgres
31
[91170]32add_users ${dbuser} shell=/bin/sh group=${dbgrp} \
[93114]33    home=${prefix}/var/db/postgresql92 \
34    realname=PostgreSQL-92\ Server
[91170]35
[66422]36startupitem.create      yes
37startupitem.init        \
38        "PGCTL=${libdir}/bin/pg_ctl"
39startupitem.start       \
[93114]40        "su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL92DATA:=${dbdir}} start -l ${logdir}/postgres.log\""
[66422]41startupitem.stop        \
[93114]42"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL92DATA:=${dbdir}} stop -s -m fast\""
[66422]43
44destroot {
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  regex
[93114]60#livecheck.url  ${homepage}
61#livecheck.regex        (9\\.2\\.\[0-9\]+)
[83882]62#livecheck.url  ${homepage}/developer/beta
[93935]63livecheck.url   ${homepage}/ftp/source/
[93114]64livecheck.regex (9\\.2\[.0-9\]+\[a-z\]+\[0-9\])
Note: See TracBrowser for help on using the repository browser.