Import of pkgsrc-2014Q1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.7 2013/02/09 11:19:16 adam Exp $
|
||||
# $NetBSD: Makefile,v 1.13 2014/03/12 17:01:57 gdt Exp $
|
||||
|
||||
PKGNAME= ${DISTNAME:C/-/91-server-/}
|
||||
COMMENT= PostgreSQL database server programs
|
||||
@@ -44,9 +44,6 @@ DL_LIBS+= -lltdl
|
||||
# PGGROUP group of the database administrator
|
||||
# PGHOME home directory of the database administrator and location of
|
||||
# the databases
|
||||
PGUSER?= pgsql
|
||||
PGGROUP?= pgsql
|
||||
PGHOME?= ${PREFIX}/${PGUSER}
|
||||
FILES_SUBST+= PGUSER=${PGUSER}
|
||||
FILES_SUBST+= PGGROUP=${PGGROUP}
|
||||
FILES_SUBST+= PGHOME=${PGHOME}
|
||||
@@ -63,6 +60,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
|
||||
PKG_HOME.${PGUSER}= ${PGHOME}
|
||||
|
||||
RCD_SCRIPTS= pgsql
|
||||
SMF_METHODS= postgresql
|
||||
SMF_NAME= postgresql
|
||||
|
||||
.include "../../databases/postgresql91-client/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@comment $NetBSD: PLIST,v 1.7 2013/04/04 21:08:36 adam Exp $
|
||||
@comment $NetBSD: PLIST,v 1.9 2014/03/11 14:05:00 jperkin Exp $
|
||||
bin/postgres
|
||||
bin/postmaster
|
||||
lib/postgresql/ascii_and_mic.so
|
||||
@@ -30,7 +30,6 @@ lib/postgresql/utf8_and_sjis.so
|
||||
lib/postgresql/utf8_and_sjis2004.so
|
||||
lib/postgresql/utf8_and_uhc.so
|
||||
lib/postgresql/utf8_and_win.so
|
||||
share/examples/rc.d/pgsql
|
||||
share/locale/cs/LC_MESSAGES/plpgsql-9.1.mo
|
||||
share/locale/de/LC_MESSAGES/plpgsql-9.1.mo
|
||||
share/locale/de/LC_MESSAGES/postgres-9.1.mo
|
||||
@@ -367,9 +366,6 @@ share/postgresql/timezone/Asia/Qatar
|
||||
share/postgresql/timezone/Asia/Qyzylorda
|
||||
share/postgresql/timezone/Asia/Rangoon
|
||||
share/postgresql/timezone/Asia/Riyadh
|
||||
share/postgresql/timezone/Asia/Riyadh87
|
||||
share/postgresql/timezone/Asia/Riyadh88
|
||||
share/postgresql/timezone/Asia/Riyadh89
|
||||
share/postgresql/timezone/Asia/Saigon
|
||||
share/postgresql/timezone/Asia/Sakhalin
|
||||
share/postgresql/timezone/Asia/Samarkand
|
||||
@@ -580,9 +576,6 @@ share/postgresql/timezone/MST7MDT
|
||||
share/postgresql/timezone/Mexico/BajaNorte
|
||||
share/postgresql/timezone/Mexico/BajaSur
|
||||
share/postgresql/timezone/Mexico/General
|
||||
share/postgresql/timezone/Mideast/Riyadh87
|
||||
share/postgresql/timezone/Mideast/Riyadh88
|
||||
share/postgresql/timezone/Mideast/Riyadh89
|
||||
share/postgresql/timezone/NZ
|
||||
share/postgresql/timezone/NZ-CHAT
|
||||
share/postgresql/timezone/Navajo
|
||||
|
||||
37
databases/postgresql91-server/files/smf/manifest.xml
Normal file
37
databases/postgresql91-server/files/smf/manifest.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
||||
<service_bundle type='manifest' name='@SMF_NAME@'>
|
||||
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
|
||||
<create_default_instance enabled='false' />
|
||||
<single_instance />
|
||||
<dependency name='network' grouping='require_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/milestone/network:default' />
|
||||
</dependency>
|
||||
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/system/filesystem/local:default' />
|
||||
</dependency>
|
||||
<method_context project='postgres'>
|
||||
<method_credential user='@PGUSER@' group='@PGGROUP@' />
|
||||
<method_environment>
|
||||
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
|
||||
</method_environment>
|
||||
</method_context>
|
||||
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
|
||||
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
|
||||
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
|
||||
<property_group name='config' type='application'>
|
||||
<propval name='data' type='astring' value='@PGHOME@/data' />
|
||||
<propval name='log' type='astring' value='@VARBASE@/log/postgresql.log' />
|
||||
</property_group>
|
||||
<stability value='Evolving' />
|
||||
<template>
|
||||
<common_name>
|
||||
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
|
||||
</common_name>
|
||||
<documentation>
|
||||
<manpage title='postgres' section='1M' />
|
||||
<doc_link name='postgresql.org' uri='http://postgresql.org' />
|
||||
</documentation>
|
||||
</template>
|
||||
</service>
|
||||
</service_bundle>
|
||||
57
databases/postgresql91-server/files/smf/postgresql.sh
Normal file
57
databases/postgresql91-server/files/smf/postgresql.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/sbin/sh
|
||||
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# ident "%Z%%M% %I% %E SMI"
|
||||
. /lib/svc/share/smf_include.sh
|
||||
|
||||
# SMF_FMRI is the name of the target service. This allows multiple instances
|
||||
# to use the same script.
|
||||
|
||||
getproparg()
|
||||
{ val=`svcprop -p $1 $SMF_FMRI`
|
||||
[ -n "$val" ] && echo $val
|
||||
}
|
||||
|
||||
PGBIN=@PREFIX@/bin
|
||||
PGDATA=`getproparg config/data`
|
||||
PGLOG=`getproparg config/log`
|
||||
|
||||
if [ -z $SMF_FMRI ]; then
|
||||
echo "SMF framework variables are not initialized."
|
||||
exit $SMF_EXIT_ERR
|
||||
fi
|
||||
|
||||
if [ -z $PGDATA ]; then
|
||||
|
||||
echo "postgresql/data property not set"
|
||||
exit $SMF_EXIT_ERR_CONFIG
|
||||
fi
|
||||
|
||||
if [ -z $PGLOG ]; then
|
||||
|
||||
echo "postgresql/log property not set"
|
||||
exit $SMF_EXIT_ERR_CONFIG
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
ulimit -n 10240
|
||||
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
|
||||
;;
|
||||
|
||||
'stop')
|
||||
$PGBIN/pg_ctl -D $PGDATA stop
|
||||
;;
|
||||
|
||||
'refresh')
|
||||
$PGBIN/pg_ctl -D $PGDATA reload
|
||||
;;
|
||||
*)
|
||||
|
||||
echo $"Usage: $0 {start|refresh}"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
exit $SMF_EXIT_OK
|
||||
Reference in New Issue
Block a user