add postgresql13

This commit is contained in:
ziggi
2020-10-24 09:52:25 +00:00
parent 2803c3baf0
commit cc2c8e85d1
13 changed files with 2013 additions and 0 deletions

153
data/postgresql13/Makefile Normal file
View File

@@ -0,0 +1,153 @@
#
# $Id: Makefile 1575 2008-07-31 07:53:53Z root $
#
PORTNAME= postgresql
PORTVERSION= 13.0
CATEGORIES= databases
MASTER_SITES+= http://ftp.postgresql.org/pub/%SUBDIR%/
MASTER_SITES+= http://ftp.de.postgresql.org/%SUBDIR%/
MASTER_SITES+= ftp://ftp.digex.net/pub/packages/database/postgresql/%SUBDIR%/
MASTER_SITES+= ftp://ftp.sunet.se/pub/unix/databases/relational/postgresql/%SUBDIR%/
MASTER_SITES+= ftp://ftp.chg.ru/pub/databases/postgresql/%SUBDIR%/
MASTER_SITES+= ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/db/postgresql/&,}
MASTER_SITE_SUBDIR= source/v${PORTVERSION}
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= onborodin@gmail.com
COMMENT= A robust, next generation, object-relational DBMS
LIB_DEPENDS+= libiconv.so:text/libiconv
LIB_DEPENDS+= libintl.so:devel/gettext
#LIB_DEPENDS+= libicuuc.so:devel/libicu
USES+= tar:bzip2 gmake bison pkgconfig
PG_OWNER= pgsql
PG_OWNER_ID= 90
PG_GROUP= pgsql
PG_GROUP_ID= 90
PG_DOC_SUBDIR= doc
PG_DOC_DIR= ${PREFIX}/${PG_DOC_SUBDIR}
PG_VAR_DIR= /var
PG_DB_DIR= ${PG_VAR_DIR}/db/pgsql
PG_LOGDIR= ${PG_VAR_DIR}/log/pgsql
PG_RUN_DIR= ${PG_VAR_DIR}/run/pgsql
USES+= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
CONFIGURE_ARGS+= --with-includes=${LOCALBASE}/include
CONFIGURE_ARGS+= --with-libraries=${LOCALBASE}/lib
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib
CONFIGURE_ARGS+= --includedir=${PREFIX}/include/${PORTNAME}
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/postgresql
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
CONFIGURE_ARGS+= --infodir=${PREFIX}/info
CONFIGURE_ARGS+= --htmldir=${PREFIX}/share/doc/postgresql
CONFIGURE_ARGS+= --without-perl
CONFIGURE_ARGS+= --without-tcl
CONFIGURE_ARGS+= --without-python
CONFIGURE_ARGS+= --without-pam
CONFIGURE_ARGS+= --enable-thread-safety
CONFIGURE_ARGS+= --enable-nls
CONFIGURE_ARGS+= --with-system-tzdata=/usr/share/zoneinfo
######CONFIGURE_ARGS+= --disable-integer-datetimes
CONFIGURE_ARGS+= --with-icu
CONFIGURE_ARGS+= --enable-depend
CONFIGURE_ARGS+= --without-ldap
CONFIGURE_ARGS+= --with-openssl
#CONFIGURE_ARGS+= --with-libedit-preferred
#CFLAGS+= -I/usr/include/edit
#CPPFLAGS+= -I/usr/include/edit
CFLAGS+= -pthread
CONFIGURE_ENV+= INCLUDES="${INCLUDES}"
CONFIGURE_ENV+= PTHREAD_LIBS="-lpthread"
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-install pkg-deinstall pkg-message
USE_RC_SUBR+= pgsql
PLIST_SUB+= PG_DOC_SUBDIR=${PG_DOC_SUBDIR}
SUB_LIST+= PG_OWNER=${PG_OWNER}
SUB_LIST+= PG_GROUP=${PG_GROUP}
SUB_LIST+= PG_OWNER_ID=${PG_OWNER_ID}
SUB_LIST+= PG_GROUP_ID=${PG_GROUP_ID}
SUB_LIST+= PG_DB_DIR=${PG_DB_DIR}
SUB_LIST+= PG_RUN_DIR=${PG_RUN_DIR}
SUB_LIST+= PG_LOG_DIR=${PG_LOG_DIR}
BINS+= clusterdb
BINS+= createdb
BINS+= createuser
BINS+= dropdb
BINS+= dropuser
BINS+= initdb
BINS+= reindexdb
BINS+= vacuumdb
BINS+= vacuumlo
BINS+= oid2name
BIN_PREFIX= pg_
SUB_LIST+= BIN_PREFIX=${BIN_PREFIX}
PLIST_SUB= BIN_PREFIX=${BIN_PREFIX}
_LIBS+= libecpg.a
_LIBS+= libecpg.so
_LIBS+= libecpg.so.6
_LIBS+= libecpg_compat.a
_LIBS+= libecpg_compat.so
_LIBS+= libecpg_compat.so.3
_LIBS+= libpgport.a
_LIBS+= libpgtypes.a
_LIBS+= libpgtypes.so
_LIBS+= libpgtypes.so.3
_LIBS+= libpq.a
_LIBS+= libpq.so
_LIBS+= libpq.so.5
post-patch:
${RM} -f ${WRKSRC}/src/backend/parser/gram.c
${RM} -f ${WRKSRC}/src/backend/parser/gram.h
${RM} -f ${WRKSRC}/src/interfaces/ecpg/preproc/preproc.c
${RM} -f ${WRKSRC}/src/interfaces/ecpg/preproc/preproc.h
post-build:
cd ${WRKSRC}/contrib && ${GMAKE} all
post-install:
cd ${WRKSRC}/contrib && ${GMAKE} DESTDIR=${STAGEDIR} install
cd ${WRKSRC} && ${GMAKE} DESTDIR=${STAGEDIR} install-docs
.for file in ${BINS}
cd ${STAGEDIR}/${PREFIX}/bin && ${MV} ${file} ${BIN_PREFIX}${file}
cd ${STAGEDIR}/${PREFIX}/man/man1 && ${MV} ${file}.1 ${BIN_PREFIX}${file}.1
.endfor
.for file in ${MAN1_DEL}
cd ${STAGEDIR}/${PREFIX}/man/man1 && ${RM} -f ${file}
.endfor
#post-patch:
# cd ${WRKSRC} && autoconf
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 1100000
LIB_DEPENDS+= libreadline.so:devel/libreadline
.endif
.include <bsd.port.post.mk>
#EOF

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1601645439
SHA256 (postgresql-13.0.tar.bz2) = 80e750be8d436b54197636a02636f8fd3263ba6779bf865b04832495ea592296
SIZE (postgresql-13.0.tar.bz2) = 20999465

View File

@@ -0,0 +1,9 @@
--- doc/Makefile.orig 2015-10-08 21:45:57.360084007 +0200
+++ doc/Makefile 2015-10-08 21:46:04.353084097 +0200
@@ -12,5 +12,5 @@
top_builddir = ..
include $(top_builddir)/src/Makefile.global
-all distprep html man install installdirs uninstall clean distclean maintainer-clean:
+all distprep man install installdirs uninstall clean distclean maintainer-clean:
$(MAKE) -C src $@

View File

@@ -0,0 +1,41 @@
--- doc/src/sgml/Makefile.orig 2018-10-15 23:12:02.000000000 +0200
+++ doc/src/sgml/Makefile 2018-10-18 22:34:13.656029000 +0200
@@ -15,7 +15,7 @@
# Make "html" the default target, since that is what most people tend
# to want to use.
-html:
+man:
# We don't need the tree-wide headers or install support here.
NO_GENERATED_HEADERS=yes
@@ -26,7 +26,7 @@
include $(top_builddir)/src/Makefile.global
-all: html man
+all: man
distprep: html distprep-man
@@ -62,7 +62,6 @@
## Man pages
##
-man distprep-man: man-stamp
man-stamp: stylesheet-man.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
@@ -212,10 +211,10 @@
## Install
##
-install: install-html install-man
+install: install-man
installdirs:
- $(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
+ $(MKDIR_P) $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
# If the install used a man directory shared with other applications, this will remove all files.
uninstall:

View File

@@ -0,0 +1,11 @@
--- src/backend/Makefile.orig 2009-07-07 15:58:33.000000000 +0200
+++ src/backend/Makefile 2009-07-07 15:58:57.000000000 +0200
@@ -107,6 +107,8 @@
# Update the commonly used headers before building the subdirectories
$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
+symlinks: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/storage/lwlocknames.h
+
# The postgres.o target is needed by the rule in Makefile.global that
# creates the exports file when MAKE_EXPORTS = true.

View File

@@ -0,0 +1,21 @@
--- src/backend/utils/misc/postgresql.conf.sample.orig 2016-10-24 20:08:51 UTC
+++ src/backend/utils/misc/postgresql.conf.sample
@@ -330,6 +330,7 @@
# - Where to Log -
+log_destination = 'syslog'
#log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
@@ -464,7 +465,9 @@
#cluster_name = '' # added to process titles if nonempty
# (change requires restart)
-#update_process_title = on
+
+# On FreeBSD, this is a performance hog, so keep it off if you need speed
+update_process_title = off
#------------------------------------------------------------------------------

View File

@@ -0,0 +1,22 @@
--- ./contrib/Makefile.orig 2020-09-21 22:47:36.000000000 +0200
+++ ./contrib/Makefile 2020-10-02 15:31:44.114462000 +0200
@@ -5,6 +5,11 @@
include $(top_builddir)/src/Makefile.global
SUBDIRS = \
+ oid2name \
+ vacuumlo
+
+
+NOSUBDIRS = \
adminpack \
amcheck \
auth_delay \
@@ -26,7 +31,6 @@
isn \
lo \
ltree \
- oid2name \
pageinspect \
passwordcheck \
pg_buffercache \

View File

@@ -0,0 +1,67 @@
#!/bin/sh
# PROVIDE: pgsql
# REQUIRE: LOGIN
prefix="%%PREFIX%%";
pgsql_data="%%PG_DB_DIR%%";
. /etc/rc.subr
# -i - enable internet sockets
# -l - enable ssl
pgsql_flags=" -i ";
pgsql_owner="%%PG_OWNER%%";
name="pgsql";
rcvar="pgsql_enable";
procname="${prefix}/bin/postgres";
pidfile="${pgsql_data}/postmaster.pid";
pgctl="${prefix}/bin/pg_ctl";
pgctl_args="-s -w -m fast -D ${pgsql_data} -o \"${pgsql_flags}\"";
extra_commands="initdb reload";
start_cmd="pgsql_command_start";
stop_cmd="pgsql_command_stop";
restart_cmd="pgsql_command_restart";
reload_cmd="pgsql_command_reload";
initdb_cmd="pgsql_initdb";
pgsql_command_start() {
if [ "$(check_process $procname)x" != "x" ]; then
echo "$name already running? ($(check_process $procname))";
exit 0;
fi
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} start" && echo "Starting pgsql.";
}
pgsql_command_stop() {
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} stop" && echo "Stoping pgsql.";
wait_for_pids $(check_process "$procname")
}
pgsql_command_restart() {
pgsql_command_stop;
# wait_for_pids $(check_process "$procname")
pgsql_command_start;
}
pgsql_command_reload() {
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} reload" && echo "Reload pgsql.";
}
pgsql_initdb() {
su ${pgsql_owner} -c "exec ${prefix}/bin//%%BIN_PREFIX%%initdb -D ${pgsql_data} -E UTF8 --locale en_GB.UTF-8 -U pgsql -W -A md5" && echo "Init pgsql database in ${pgsql_data}";
}
load_rc_config $name
: ${pgsql_enable=NO}
run_rc_command "$1"
#EOF

View File

@@ -0,0 +1,15 @@
#!/bin/sh -x
PG_OWNER="%%PG_OWNER%%"
PG_GROUP="%%PG_GROUP%%"
PG_DB_DIR="%%PG_DB_DIR%%"
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
rmdir ${PG_DB_DIR} || (ls -l ${PG_DB_DIR} ; du -sch ${PG_DB_DIR})
;;
esac
#EOF

View File

@@ -0,0 +1,30 @@
#!/bin/sh -x
PG_OWNER="%%PG_OWNER%%"
PG_GROUP="%%PG_GROUP%%"
PG_OWNER_ID="%%PG_OWNER_ID%%"
PG_GROUP_ID="%%PG_GROUP_ID%%"
PG_DB_DIR="%%PG_DB_DIR%%"
PKG__PPREFIX="/notexist"
case $2 in
PRE-INSTALL)
pw group add ${PG_GROUP} -g ${PG_GROUP_ID}
pw user add ${PG_OWNER} -u ${PG_OWNER_ID} -g ${PG_GROUP} \
-d ${PKG_PREFIX} -m -s "/bin/sh" \
-c "postgresql"
pw group mod ${PG_GROUP} -M ${PG_OWNER}
pw user show ${PG_OWNER}
pw group show ${PG_GROUP}
mkdir -p ${PG_DB_DIR}
chown ${PG_OWNER}:${PG_GROUP} ${PG_DB_DIR}
chmod 0700 ${PG_DB_DIR}
;;
POST-INSTALL)
;;
esac
#EOF

View File

@@ -0,0 +1,17 @@
***************************************************************************
1 For initialize databases area with admin %%PG_OWNER%% and base
encoding UTF8:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_initdb -D %%PG_DB_DIR%% \
-E UTF8 --locale en_GB.UTF-8 -U %%PG_OWNER%% -W -A md5'
2 Add user:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_createuser --createrole \
--superuser --createdb --pwprompt --echo username'
3 Create database:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_createdb db_name'
***************************************************************************

View File

@@ -0,0 +1,24 @@
PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS),
derived from the Berkeley Postgres database management system. While
PostgreSQL retains the powerful object-relational data model, rich data types
and easy extensibility of Postgres, it replaces the PostQuel query language
with an extended subset of SQL.
The original Postgres code was the effort of many graduate students,
undergraduate students, and staff programmers working under the direction of
Professor Michael Stonebraker at the University of California, Berkeley. In
1995, Andrew Yu and Jolly Chen took on the task of converting the DBMS query
language to SQL and created a new database system which came to known as
Postgres95. Many others contributed to the porting, testing, debugging and
enhancement of the Postgres95 code. As the code improved, and 1995 faded into
memory, PostgreSQL was born.
PostgreSQL development is presently being performed by a team of Internet
developers who are now responsible for all current and future development. The
development team coordinator is Marc G. Fournier (scrappy@PostgreSQL.ORG).
Support is available from the PostgreSQL developer/user community through the
support mailing list (questions@PostgreSQL.ORG).
PostgreSQL is free and the complete source is available.
WWW: http://www.postgresql.org

1600
data/postgresql13/pkg-plist Normal file

File diff suppressed because it is too large Load Diff