From 2a98584374a1388ccb2da8dcf0450ebc27fcf9d5 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Tue, 4 Oct 2022 17:50:08 +0200 Subject: [PATCH] added unofficial outbag-server build script --- outbag-server/APKBUILD | 36 ++++++++++++++++++++++++++++++++++++ outbag-server/README.org | 4 ++++ 2 files changed, 40 insertions(+) create mode 100644 outbag-server/APKBUILD create mode 100644 outbag-server/README.org diff --git a/outbag-server/APKBUILD b/outbag-server/APKBUILD new file mode 100644 index 0000000..d8589dd --- /dev/null +++ b/outbag-server/APKBUILD @@ -0,0 +1,36 @@ +# Maintainer: Jakob Meier +pkgname=outbag-server +pkgver=0.0.1 +pkgrel=0 +provides="outbag-server" +pkgdesc="Official outbag server" +url="https://gitlab.com/outbag/server" +arch="aarch64 x86 x86_64" +license="AGPL-3" +makedepends="nodejs npm esbuild upx" +source="$pkgname-$pkgver.tar.gz::https://gitlab.com/outbag/server/-/archive/main/server-main.tar.gz" +# probably has to be replaced with version tag once available +builddir="$srcdir/server-main" +options="!check !strip" + +build() { + # install dependencies + npm install + npm install pkg + + # bundle module to commonjs syntax + mkdir -p $srcdir/build/bundle + esbuild . --platform=node --bundle --minify --outfile=$srcdir/build/bundle/main.js + + # use pkg to build binary + mkdir -p $srcdir/build/binary + npx pkg -t node16-linux -o $srcdir/build/bin/outbag-server $srcdir/build/bundle/main.js +} + +package() { + mkdir -p $pkgdir/usr/bin + install -Dm755 "$srcdir"/build/bin/outbag-server "$pkgdir"/usr/bin/ +} +sha512sums=" +5b1bfe481400053e027d2fd6a7c9a44bad72440a3ff84b3d7939d04f00ca587e5bdedc43434663e11e81a13abb3ac0a72f262a384447462a5171e943b6735c5d outbag-server-0.0.1.tar.gz +" diff --git a/outbag-server/README.org b/outbag-server/README.org new file mode 100644 index 0000000..d07fe3c --- /dev/null +++ b/outbag-server/README.org @@ -0,0 +1,4 @@ +* Outbag Server +This is an unofficial outbag-server build. +The official files +can be found on their official [[https://gitlab.com/outbag/server/][gitlab repo]] -- 2.38.5