aboutsummaryrefslogtreecommitdiffstats
path: root/main/pgtcl/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/pgtcl/APKBUILD')
-rw-r--r--main/pgtcl/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/main/pgtcl/APKBUILD b/main/pgtcl/APKBUILD
new file mode 100644
index 0000000000..e9701d6e86
--- /dev/null
+++ b/main/pgtcl/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
+# Maintainer: G.J.R. Timmer <gjr.timmer@gmail.com>
+pkgname=pgtcl
+_pkgname=Pgtcl
+pkgver=2.1.0
+pkgrel=0
+pkgdesc="Tcl client side interface to PostgreSQL (libpgtcl)"
+url="https://flightaware.github.io/Pgtcl/"
+arch="all"
+license="BSD"
+makedepends="postgresql-dev tcl-dev docbook2x"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+prepare() {
+ default_prepare || return 1
+
+ cd "$builddir"
+ sed -i -e 's/docbook2man/docbook2x-man/g' \
+ -e 's|sh \./fix-fi\.sh man/\*||g' \
+ doc/Makefile
+}
+
+build() {
+ cd "$builddir"
+
+ local x64_flags
+ case "$CARCH" in
+ aarch64 | x86_64) x64_flags="--enable-64bit";;
+ esac
+
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-rpath \
+ --enable-threads \
+ $x64_flags \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+
+ make DESTDIR="$pkgdir" install || return 1
+ make -C doc DESTDIR="$pkgdir" all || return 1
+
+ # Remove empty directories.
+ rmdir "$pkgdir"/usr/bin "$pkgdir"/usr/include
+}
+
+md5sums="920cb0c59557f18923a53f0598d2d7dd pgtcl-2.1.0.tar.gz"
+sha256sums="98eafb1f1e2b6ea08fd7606d1b4e6fe83d63e8e5cebef8bb7ea02144c259d1f0 pgtcl-2.1.0.tar.gz"
+sha512sums="895f81548d5fde128b258cfb9cad732f539089a7c89bad08b7bc8a229d7f2ecdb9b31a374ddb3fb392ed3e20ba45cca47c2dccfa6ab86e617177f7021d08b3b3 pgtcl-2.1.0.tar.gz"