aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorG.J.R. Timmer <gjr.timmer@gmail.com>2016-12-21 10:33:16 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-02-07 11:53:35 +0100
commit04de19a1bdf4fd5cdaff7ded16e95db39fc087e9 (patch)
treef5c5c2b2209674002b35134841b4893cd6cfbf59 /main
parentbdd718e607ea2be981c3b7861469102c358e4e37 (diff)
downloadaports-04de19a1bdf4fd5cdaff7ded16e95db39fc087e9.tar.bz2
aports-04de19a1bdf4fd5cdaff7ded16e95db39fc087e9.tar.xz
main/postgresql: add support for PL/Perl, PL/Python and PL/Tcl
Diffstat (limited to 'main')
-rw-r--r--main/postgresql/APKBUILD50
-rw-r--r--main/postgresql/postgresql-plperl.post-install6
2 files changed, 53 insertions, 3 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index fe6270a527..d219a597a3 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -1,7 +1,8 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
pkgname=postgresql
pkgver=9.6.1
-pkgrel=0
+pkgrel=1
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
arch="all"
@@ -12,9 +13,9 @@ pkgusers="postgres"
pkggroups="postgres"
depends_dev="libressl-dev"
makedepends="$depends_dev libedit-dev zlib-dev libxml2-dev util-linux-dev
- openldap-dev"
+ openldap-dev tcl-dev perl-dev python-dev"
subpackages="$pkgname-contrib $pkgname-dev $pkgname-doc libpq $pkgname-libs
- $pkgname-client"
+ $pkgname-client $pkgname-plperl $pkgname-plpython $pkgname-pltcl"
patches="initdb.patch"
source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2
$patches
@@ -52,6 +53,9 @@ build() {
--with-openssl \
--with-uuid=e2fs \
--disable-rpath \
+ --with-perl \
+ --with-python \
+ --with-tcl \
|| return 1
make world || return 1
@@ -119,6 +123,46 @@ contrib() {
rmdir -p "$subpkgdir"/usr/share/doc/postgresql || true
}
+plperl() {
+ depends=""
+ pkgdesc="PL/Perl procedural language for PostgreSQL"
+ install="$subpkgname.post-install"
+
+ mkdir -p "$subpkgdir"/usr/lib/postgresql
+ mv "$pkgdir"/usr/lib/postgresql/plperl.so "$subpkgdir"/usr/lib/postgresql/plperl.so
+
+ mkdir -p "$subpkgdir"/usr/share/postgresql/extension
+ mv "$pkgdir"/usr/share/postgresql/extension/plperl* "$subpkgdir"/usr/share/postgresql/extension/
+}
+
+plpython() {
+ depends=""
+ pkgdesc="PL/Python procedural language for PostgreSQL"
+
+ mkdir -p "$subpkgdir"/usr/lib/postgresql
+ mv "$pkgdir"/usr/lib/postgresql/plpython2.so "$subpkgdir"/usr/lib/postgresql/plpython2.so
+
+ mkdir -p "$subpkgdir"/usr/share/postgresql/extension
+ mv "$pkgdir"/usr/share/postgresql/extension/plpython* "$subpkgdir"/usr/share/postgresql/extension/
+}
+
+pltcl() {
+ depends="pgtcl"
+ pkgdesc="PL/Tcl procedural language for PostgreSQL"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/pltcl* "$subpkgdir"/usr/bin
+
+ mkdir -p "$subpkgdir"/usr/lib/postgresql
+ mv "$pkgdir"/usr/lib/postgresql/pltcl.so "$subpkgdir"/usr/lib/postgresql/pltcl.so
+
+ mkdir -p "$subpkgdir"/usr/share/postgresql
+ mv "$pkgdir"/usr/share/postgresql/unknown.pltcl "$subpkgdir"/usr/share/postgresql/unknown.pltcl
+
+ mkdir -p "$subpkgdir"/usr/share/postgresql/extension
+ mv "$pkgdir"/usr/share/postgresql/extension/pltcl* "$subpkgdir"/usr/share/postgresql/extension/
+}
+
md5sums="92ae6d7cdf18e648b3c22d0aa015565d postgresql-9.6.1.tar.bz2
538fa611966ee43c001dafdc1587c170 initdb.patch
a7a193cce4443998e3a47fde4f10723e postgresql.initd
diff --git a/main/postgresql/postgresql-plperl.post-install b/main/postgresql/postgresql-plperl.post-install
new file mode 100644
index 0000000000..4cc8198c04
--- /dev/null
+++ b/main/postgresql/postgresql-plperl.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ ! -L /usr/lib/libperl.so ]; then
+ find /usr/lib/* -name libperl.so -exec ln -s {} /usr/lib/libperl.so \;
+fi
+