1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 04:35:13 +03:00
aports/testing/node-libpg-query/APKBUILD

47 lines
1.6 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=node-libpg-query
_npmname=libpg-query
pkgver=13.1.2
# XXX: upstream does not use tags
_gitrev=f34989e21713a66938f559480230359b4a7d3c31
pkgrel=1
pkgdesc="The real PostgreSQL query parser for Node.js (experimental aport!)"
url="https://github.com/pyramation/libpg-query-node"
# riscv64: missing libpg_query
# x86: textrels
arch="all !x86 !riscv64"
license="MIT"
makedepends="libpg_query-dev nodejs-dev python3 yarn"
source="https://github.com/pyramation/libpg-query-node/archive/$_gitrev/$pkgname-$_gitrev.tar.gz
gyp.patch
package.patch
"
builddir="$srcdir/$_npmname-node-$_gitrev"
prepare() {
default_prepare
sed -Eix 's/"pg_query.h"/<pg_query.h>/' queryparser.cc src/*
}
build() {
yarn install --frozen-lockfile --ignore-scripts --non-interactive
yarn rebuild --release --verbose --nodedir=/usr/include/node
yarn pack -f package.tgz
}
check() {
yarn check
}
package() {
tar -xf package.tgz \
--strip-components=1 \
--one-top-level="$pkgdir"/usr/lib/node_modules/$_npmname
}
sha512sums="
54f28409383783877f66a40375a663401c5fd2b8a6a73c059e6d286cb28332c489f1bf7ed67c6aaaab164a9443ad347f6bd7031dc4fdc5eac389c0bf40b16256 node-libpg-query-f34989e21713a66938f559480230359b4a7d3c31.tar.gz
54d3a540fc351a4e8530ad7455b25df666efef564699626da363531caf483785abea1bf1ba7b895c385af852dfffbd032c759d2cd73882bf77b8836aa9c9bbda gyp.patch
d6656ddc5ee9b0c3365bb4f6f7deb0fea24cadf08450a09e0615a2c7c44f65ce6e2dcbddcf921af92bf9a3608d0134d1b2910b1af9e97b79a62600bab4f11f34 package.patch
"