user/rmfakecloud: match to MR
This commit is contained in:
parent
b02e8bd846
commit
cf7bf72864
3 changed files with 65 additions and 48 deletions
|
@ -1,61 +1,56 @@
|
||||||
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||||
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||||
|
|
||||||
pkgname=rmfakecloud
|
pkgname=rmfakecloud
|
||||||
pkgver=20211128
|
pkgver=0.0.9
|
||||||
_gittag=5d31dc08e6e804f899b8d9fd63ca86dd4c59e880
|
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="rmfakecloud is fake of the cloud sync the remarkable tablet is using"
|
pkgdesc="A selfhosted cloud for the Remarkable Tablet"
|
||||||
url="https://github.com/ddvk/rmfakecloud"
|
url="https://github.com/ddvk/rmfakecloud"
|
||||||
arch="x86_64"
|
arch="all"
|
||||||
license="AGPL3"
|
license="AGPL-3.0-only"
|
||||||
depends="nginx"
|
|
||||||
makedepends="go yarn"
|
makedepends="go yarn"
|
||||||
|
options="chmod-clean"
|
||||||
source="
|
source="
|
||||||
$pkgname-$pkgver.tar.gz::https://github.com/ddvk/rmfakecloud/archive/$_gittag.tar.gz
|
$pkgname-$pkgver.tar.gz::https://github.com/ddvk/rmfakecloud/archive/v$pkgver.tar.gz
|
||||||
rmfakecloud.conf
|
rmfakecloud.conf
|
||||||
rmfakecloud.nginx
|
rmfakecloud.openrc
|
||||||
rmfakecloud.initd"
|
"
|
||||||
_giturl="https://github.com/ddvk/rmfakecloud"
|
|
||||||
builddir="$srcdir/$pkgname"
|
|
||||||
subpackages="$pkgname-openrc"
|
subpackages="$pkgname-openrc"
|
||||||
options="!check chmod-clean"
|
|
||||||
builddir="${srcdir}/${pkgname}"
|
|
||||||
|
|
||||||
snapshot() {
|
case "$CTARGET_ARCH" in
|
||||||
if ! [ -d $pkgname.git ]; then
|
aarch64)export GOARCH="arm64" ;;
|
||||||
git clone $_giturl $pkgname.git || return 1
|
armel) export GOARCH="arm" GOARM=5 ;;
|
||||||
cd $pkgname.git
|
armhf) export GOARCH="arm" GOARM=6 ;;
|
||||||
else
|
armv7) export GOARCH="arm" GOARM=7 ;;
|
||||||
cd $pkgname.git
|
s390x) export GOARCH="s390x" ;;
|
||||||
git fetch || return 1
|
x86) export GOARCH="386" ;;
|
||||||
fi
|
x86_64) export GOARCH="amd64" ;;
|
||||||
|
ppc64) export GOARCH="ppc64" ;;
|
||||||
echo "Checking out"
|
ppc64le) export GOARCH="ppc64le" ;;
|
||||||
git checkout $_gittag
|
riscv64) export GOARCH="riscv64" ;;
|
||||||
echo "Repo archive"
|
*) export GOARCH="unsupported";;
|
||||||
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
|
esac
|
||||||
|
|
||||||
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
|
|
||||||
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$builddir"
|
|
||||||
export GOPATH="$srcdir/go"
|
export GOPATH="$srcdir/go"
|
||||||
make dist/rmfakecloud-x64
|
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() {
|
package() {
|
||||||
cd "$builddir"
|
install -Dm755 "$builddir"/rmfakecloud "$pkgdir"/usr/bin/rmfakecloud
|
||||||
install -Dm755 ${builddir}/dist/rmfakecloud-x64 "$pkgdir"/usr/bin/rmfakecloud
|
install -Dm644 "$srcdir"/rmfakecloud.conf "$pkgdir"/etc/conf.d/rmfakecloud
|
||||||
install -Dm644 ${srcdir}/rmfakecloud.nginx "$pkgdir"/etc/nginx/conf.d/rmfakecloud.conf
|
install -Dm755 "$srcdir"/rmfakecloud.openrc "$pkgdir"/etc/init.d/rmfakecloud
|
||||||
install -Dm644 ${srcdir}/rmfakecloud.conf "$pkgdir"/etc/conf.d/rmfakecloud.conf
|
|
||||||
install -Dm755 ${srcdir}/rmfakecloud.initd "$pkgdir"/etc/init.d/rmfakecloud
|
|
||||||
install -Dm700 -d "$pkgdir"/var/lib/rmfakecloud
|
|
||||||
install -Dm700 -d "$pkgdir"/var/log/rmfakecloud
|
|
||||||
}
|
}
|
||||||
sha512sums="
|
sha512sums="
|
||||||
7f2f86e5baf6c43c036f87ae874ebd465f749c7df0bf393017966d9be3513c677987fa2325eb7a68c4d2f169fa74bc74ac473f4e33a3ad597afd16b035316f1c rmfakecloud-20211128.tar.gz
|
1b330fef54f99307dfe2b5230e0e10a9da233a7c83f311825267fbac1401b2437ecb37eb2fdaf51c00ec0d7869c2a130f75e3005e07f72574393ed5f1550e781 rmfakecloud-0.0.9.tar.gz
|
||||||
b9f47b7a0a640b4ec565850f77df7356daa7760ea94499f13350cabc42c2bcb5c8d64188908e46b58b0f4a929776c6f0f42b67de014267a8674fc772c6efa10d rmfakecloud.conf
|
d5677cef282085cd6642a034dd258ffa294862aeb0ce81d6485a524a15564849bc4eb90a9d1fa4dbcf4eab69dcd893302aa06493fc8fad74d69200c2bdf246c0 rmfakecloud.conf
|
||||||
463f0a922c206dabd0dc4c6e43a3b0269245aeca6b4176c894e45e476aee6466965bd50863e60f619c6829dbf765ba66e3827f5eff06046e0a911fde50ef9e97 rmfakecloud.nginx
|
891d0945886796132f951293e081046334857563b4ebae28a3aa5b6bc37768767c49ce102de645ed8340af2518de606be8bf6ecafeb6d189dd937970aa3e6498 rmfakecloud.openrc
|
||||||
32ee768a73a8e16b3d8097f4f5136a5ac0258f6a33ea8bff2e94ae11e658f4ee013f3149bd695d11ad2caeb54c8f82251e568f37683fcd84d5e41c51a34018e9 rmfakecloud.initd
|
|
||||||
"
|
"
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
STORAGE_URL=https://my.remarkable.com
|
STORAGE_URL=https://your.domain.com
|
||||||
|
JWT_SECRET_KEY=
|
||||||
PORT=3000
|
PORT=3000
|
||||||
DATADIR=/var/lib/rmfakecloud/data
|
DATADIR=/var/lib/rmfakecloud/data
|
||||||
|
RM_USER=rm
|
||||||
|
RM_GROUP=www-data
|
||||||
RM_SMTP_SERVER=
|
RM_SMTP_SERVER=
|
||||||
RM_SMTP_USERNAME=
|
RM_SMTP_USERNAME=
|
||||||
RM_SMTP_PASSWORD=
|
RM_SMTP_PASSWORD=
|
||||||
RM_SMTP_FROM='"Document Remarkable" <no-reply@example.com>
|
RM_SMTP_FROM='"Document Remarkable" <no-reply@example.com>'
|
||||||
RMAPI_HWR_APPLICATIONKEY=
|
RMAPI_HWR_APPLICATIONKEY
|
||||||
RMAPI_HWR_HMAC=
|
RMAPI_HWR_HMAC=
|
||||||
|
TLS_KEY=
|
||||||
|
TLS_CERT=
|
||||||
|
|
18
user/rmfakecloud/rmfakecloud.openrc
Normal file
18
user/rmfakecloud/rmfakecloud.openrc
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
name="$RC_SVCNAME"
|
||||||
|
cfgfile="/etc/conf.d/$RC_SVCNAME"
|
||||||
|
pidfile="/var/run/$RC_SVCNAME.pid"
|
||||||
|
command="/usr/bin/rmfakecloud"
|
||||||
|
command_args=""
|
||||||
|
command_user="$RM_USER"
|
||||||
|
command_group="$RM_GROUP"
|
||||||
|
start_stop_daemon_args=""
|
||||||
|
command_background="yes"
|
||||||
|
output_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log"
|
||||||
|
error_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.err"
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
||||||
|
/var/log/$RC_SVCNAME /var/lib/$RC_SVCNAME
|
||||||
|
export STORAGE_URL PORT DATADIR RM_SMTP_SERVER RM_SMTP_USERNAME RM_SMTP_PASSWORD RM_SMTP_FROM RMAPI_HWR_APPLICATIONKEY RMAPI_HWR_HMAC TLS_KEY TLS_CERT
|
||||||
|
}
|
Loading…
Reference in a new issue