ayaports/user/rmfakecloud/APKBUILD
2023-01-10 22:05:11 +00:00

57 lines
1.8 KiB
Text

# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=rmfakecloud
pkgver=0.0.12
_gittag=v$pkgver
pkgrel=0
pkgdesc="A selfhosted cloud for the Remarkable Tablet"
url="https://github.com/ddvk/rmfakecloud"
arch="all"
license="AGPL-3.0-only"
makedepends="go yarn"
options="chmod-clean"
source="
$pkgname-$pkgver.tar.gz::https://github.com/ddvk/rmfakecloud/archive/v$pkgver.tar.gz
rmfakecloud.conf
rmfakecloud.openrc
"
subpackages="$pkgname-openrc"
case "$CTARGET_ARCH" in
aarch64)export GOARCH="arm64" ;;
armel) export GOARCH="arm" GOARM=5 ;;
armhf) export GOARCH="arm" GOARM=6 ;;
armv7) export GOARCH="arm" GOARM=7 ;;
s390x) export GOARCH="s390x" ;;
x86) export GOARCH="386" ;;
x86_64) export GOARCH="amd64" ;;
ppc64) export GOARCH="ppc64" ;;
ppc64le) export GOARCH="ppc64le" ;;
riscv64) export GOARCH="riscv64" ;;
*) export GOARCH="unsupported";;
esac
build() {
export GOPATH="$srcdir/go"
export LDFLAGS="$LDFLAGS -X main.version=$pkgver"
yarn --cwd ui
yarn --cwd ui build
go build ./cmd/rmfakecloud
}
check() {
export GOPATH="$srcdir/go"
make test testgo testui
}
package() {
install -Dm755 "$builddir"/rmfakecloud "$pkgdir"/usr/bin/rmfakecloud
install -Dm644 "$srcdir"/rmfakecloud.conf "$pkgdir"/etc/conf.d/rmfakecloud
install -Dm755 "$srcdir"/rmfakecloud.openrc "$pkgdir"/etc/init.d/rmfakecloud
}
sha512sums="
6a09b32d4ce74b9d3b03dd63aadf857d46c1f07ca4b05c1d203595f04c6395ff41fca76f899376d5db0ecc5067c2bd1a2972ee59d98b99c867aabeb4245d9209 rmfakecloud-0.0.12.tar.gz
d5677cef282085cd6642a034dd258ffa294862aeb0ce81d6485a524a15564849bc4eb90a9d1fa4dbcf4eab69dcd893302aa06493fc8fad74d69200c2bdf246c0 rmfakecloud.conf
891d0945886796132f951293e081046334857563b4ebae28a3aa5b6bc37768767c49ce102de645ed8340af2518de606be8bf6ecafeb6d189dd937970aa3e6498 rmfakecloud.openrc
"