0
0
Fork 0
haikuports/dev-db/postgresql/postgresql-9.6.10.recipe

162 lines
5.5 KiB
Bash

SUMMARY="A powerful object-relational database system"
DESCRIPTION="PostgreSQL has more than 15 years of active development and a \
proven architecture that has earned it a strong reputation for reliability, \
data integrity, and correctness.
* It runs on all major operating systems, including Linux, UNIX (AIX, BSD, \
HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.
* It is fully ACID compliant, has full support for foreign keys, joins, \
views, triggers, and stored procedures (in multiple languages).
* It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, \
CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP.
* It supports storage of binary large objects, including pictures, sounds, or \
video.
* It has native programming interfaces for C/C++, Java, .Net, Perl, Python, \
Ruby, Tcl, ODBC, among others, and exceptional documentation."
HOMEPAGE="https://www.postgresql.org/"
COPYRIGHT="1996-2017 PostgreSQL Global Development Group"
LICENSE="PostgreSQL"
REVISION="2"
SOURCE_URI="https://ftp.postgresql.org/pub/source/v$portVersion/postgresql-$portVersion.tar.bz2"
CHECKSUM_SHA256="8615acc56646401f0ede97a767dfd27ce07a8ae9c952afdb57163b7234fe8426"
SOURCE_DIR="postgresql-$portVersion"
PATCHES="postgresql-$portVersion.patchset"
ARCHITECTURES="?all x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
postgresql$secondaryArchSuffix = $portVersion compat >= 9
cmd:psql$secondaryArchSuffix = $portVersion compat >= 9
lib:libecpg$secondaryArchSuffix = $portVersion compat >= 9
lib:libecpg_compat$secondaryArchSuffix = $portVersion compat >= 9
lib:libpgtypes$secondaryArchSuffix = $portVersion compat >= 9
lib:libpq$secondaryArchSuffix = $portVersion compat >= 9
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_server="
cmd:clusterdb$secondaryArchSuffix = $portVersion compat >= 9
cmd:createdb$secondaryArchSuffix = $portVersion compat >= 9
cmd:createlang$secondaryArchSuffix = $portVersion compat >= 9
cmd:createuser$secondaryArchSuffix = $portVersion compat >= 9
cmd:dropdb$secondaryArchSuffix = $portVersion compat >= 9
cmd:droplang$secondaryArchSuffix = $portVersion compat >= 9
cmd:dropuser$secondaryArchSuffix = $portVersion compat >= 9
cmd:ecpg$secondaryArchSuffix = $portVersion compat >= 9
cmd:initdb$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_archivecleanup$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_basebackup$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_config$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_controldata$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_ctl$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_dump$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_dumpall$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_isready$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_receivexlog$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_resetxlog$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_recvlogical$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_restore$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_rewind$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_test_fsync$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_test_timing$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_upgrade$secondaryArchSuffix = $portVersion compat >= 9
cmd:pg_xlogdump$secondaryArchSuffix = $portVersion compat >= 9
cmd:pgbench$secondaryArchSuffix = $portVersion compat >= 9
cmd:postgres$secondaryArchSuffix = $portVersion compat >= 9
cmd:postmaster$secondaryArchSuffix = $portVersion compat >= 9
cmd:reindexdb$secondaryArchSuffix = $portVersion compat >= 9
cmd:vacuumdb$secondaryArchSuffix = $portVersion compat >= 9
"
REQUIRES_server="
haiku$secondaryArchSuffix
postgresql${secondaryArchSuffix} == $portVersion base
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
postgresql${secondaryArchSuffix}_devel = $portVersion
devel:libecpg$secondaryArchSuffix = $portVersion
devel:libecpg_compat$secondaryArchSuffix = $portVersion
devel:libpgfeutils$secondaryArchSuffix = $portVersion
devel:libpgcommon$secondaryArchSuffix = $portVersion
devel:libpgport$secondaryArchSuffix = $portVersion
devel:libpgtypes$secondaryArchSuffix = $portVersion
devel:libpq$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
postgresql${secondaryArchSuffix} == $portVersion base
"
# don't allow two postgres servers of the same major version
# to be installed simultaneously.
if [ -n "$secondaryArchSuffix" ]; then
CONFLICTS_server="
postgresql_server
"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libreadline$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:awk
cmd:bison
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
CFLAGS=-D_BSD_SOURCE runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libpgport \
libpgcommon \
libecpg \
libpgfeutils \
libpgtypes \
libpq \
libecpg_compat
fixPkgconfig
mkdir -p $developLibDir/postgresql/pgxs
mv $libDir/postgresql/pgxs $developLibDir/postgresql/
# we want to keep the psql command in the base package
mv $binDir/psql psql_tmp
# all other commands go in the server package
packageEntries server \
$binDir \
$dataDir/postgresql/ \
$libDir/postgresql
mkdir -p $binDir
mv psql_tmp $binDir/psql
packageEntries devel \
$developDir
}
TEST()
{
make check
}