aboutsummaryrefslogtreecommitdiffstats
path: root/testing/postgresql-pg_cron
diff options
context:
space:
mode:
Diffstat (limited to 'testing/postgresql-pg_cron')
-rw-r--r--testing/postgresql-pg_cron/APKBUILD35
-rw-r--r--testing/postgresql-pg_cron/postgresql-pg_cron.post-install10
2 files changed, 45 insertions, 0 deletions
diff --git a/testing/postgresql-pg_cron/APKBUILD b/testing/postgresql-pg_cron/APKBUILD
new file mode 100644
index 0000000000..4bb08da52b
--- /dev/null
+++ b/testing/postgresql-pg_cron/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
+# Maintainer: G.J.R. Timmer <gjr.timmer@gmail.com>
+pkgname=postgresql-pg_cron
+_projname=pg_cron
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="Cron-based scheduler for PostgreSQL 9.5+"
+url="https://github.com/citusdata/pg_cron"
+arch="all"
+license="PostgreSQL"
+depends="postgresql"
+makedepends="postgresql-dev"
+provides="pg_cron=$pkgver-r$pkgrel"
+install="$pkgname.post-install"
+source="https://github.com/citusdata/pg_cron/archive/v$pkgver/$_projname-$pkgver.tar.gz"
+builddir="$srcdir/$_projname-$pkgver"
+options="!check" # no tests provided
+
+prepare() {
+ default_prepare
+ # Remove -Werror from Makefile
+ # Required to compile on alpine, to ignore compilation warnings
+ sed "s/-Werror //" -i Makefile
+}
+
+build() {
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+sha512sums="fe11fc42fa8d3de4ff08440f96bcc5c228408ae01f7c1cf676d8dbab6ebef9aa0496aa3d5e785ec850eee3b484dc7ec0bf930a9c09e4267d10375adb9027f0b1 pg_cron-1.2.0.tar.gz"
diff --git a/testing/postgresql-pg_cron/postgresql-pg_cron.post-install b/testing/postgresql-pg_cron/postgresql-pg_cron.post-install
new file mode 100644
index 0000000000..b8e13ba49f
--- /dev/null
+++ b/testing/postgresql-pg_cron/postgresql-pg_cron.post-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cat <<EOF
+*
+* Add the following line to postgresql.conf and restart PostgreSQL:
+* shared_preload_libraries = 'pg_cron'
+*
+EOF
+
+exit 0