From cfb0dcbe2a87e528693828f97bf8567a66d6d867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Mon, 6 Nov 2023 23:43:14 +0100 Subject: [PATCH] New package: postgrest-10.2.0 --- srcpkgs/postgrest/template | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 srcpkgs/postgrest/template diff --git a/srcpkgs/postgrest/template b/srcpkgs/postgrest/template new file mode 100644 index 00000000000..9c7af3039fe --- /dev/null +++ b/srcpkgs/postgrest/template @@ -0,0 +1,35 @@ +# Template file for 'postgrest' +pkgname=postgrest +version=10.2.0 +revision=1 +hostmakedepends="cabal-install postgresql-libs-devel" +makedepends="zlib-devel postgresql-libs-devel" +short_desc="REST API for any Postgres database" +maintainer="Piotr Wójcik " +license="MIT" +homepage="https://postgrest.org/" +distfiles="https://github.com/PostgREST/postgrest/archive/v${version}.tar.gz" +checksum=23d63292d50d303bf61154061704f642dd3d699367e2ccb159ec7604f2848487 +nocross="cabal does not support cross compilation" +nopie=yes # ghc is currently built without PIE support + +_cabal_opts="-g" + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + _cabal_opts+=" --ghc-option -latomic" +fi + +if [ "$XBPS_MAKEJOBS" ]; then + _cabal_opts+=" --jobs=$XBPS_MAKEJOBS" +fi + +do_build() { + cabal update $_cabal_opts + cabal build $_cabal_opts + mv dist-newstyle/build/*/*/postgrest-${version}/x/postgrest/build/postgrest/postgrest postgrest +} + +do_install() { + vbin postgrest + vlicense LICENSE +}