You've already forked remote-local-storage
Initial commit
This commit is contained in:
18
.SRCINFO
Normal file
18
.SRCINFO
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
pkgbase = remote-local-storage-git
|
||||||
|
pkgdesc = Simple wrapper to save and restore localStorage of webapps in server
|
||||||
|
pkgver = r8.ea930dc
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://gitea.balki.me/balki/remote-local-storage
|
||||||
|
arch = x86_64
|
||||||
|
license = MPL-2.0
|
||||||
|
makedepends = git
|
||||||
|
makedepends = go
|
||||||
|
conflicts = remote-local-storage
|
||||||
|
source = git+https://gitea.balki.me/balki/remote-local-storage.git#branch=main
|
||||||
|
source = remote-local-storage.service
|
||||||
|
source = remote-local-storage.socket
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = 6bdfbf02c5caef218507087d32cfdedcade0e74f97e099574f3dd8b0d66dfeb6
|
||||||
|
sha256sums = 4c0a9bc570346857c0132e14eb277dd25ea97cd6d35b560e69f8c60b4bd252c1
|
||||||
|
|
||||||
|
pkgname = remote-local-storage-git
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
remote-local-storage/
|
||||||
47
PKGBUILD
Normal file
47
PKGBUILD
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Maintainer: Balakrishnan Balasubramanian <aur@balki.me>
|
||||||
|
|
||||||
|
# Reference: https://wiki.archlinux.org/index.php?title=Go_package_guidelines#Sample_PKGBUILD
|
||||||
|
|
||||||
|
pkgname=remote-local-storage-git
|
||||||
|
_pkgname=remote-local-storage
|
||||||
|
pkgver=r8.ea930dc
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Simple wrapper to save and restore localStorage of webapps in server'
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://gitea.balki.me/balki/$_pkgname"
|
||||||
|
license=('MPL-2.0')
|
||||||
|
conflicts=("${_pkgname}")
|
||||||
|
makedepends=('git' 'go')
|
||||||
|
source=("git+$url.git#branch=main" "$_pkgname.service" "$_pkgname.socket")
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'6bdfbf02c5caef218507087d32cfdedcade0e74f97e099574f3dd8b0d66dfeb6'
|
||||||
|
'4c0a9bc570346857c0132e14eb277dd25ea97cd6d35b560e69f8c60b4bd252c1')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
mkdir -p build/
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||||
|
go build -o build ./
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
install -Dm755 build/"$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
||||||
|
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$_pkgname"
|
||||||
|
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||||
|
install -Dm644 "${srcdir}/$_pkgname.service" -t "$pkgdir/usr/lib/systemd/system"
|
||||||
|
install -Dm644 "${srcdir}/$_pkgname.socket" -t "$pkgdir/usr/lib/systemd/system"
|
||||||
|
}
|
||||||
21
remote-local-storage.service
Normal file
21
remote-local-storage.service
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=localStorage persistence service for web applications
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
|
||||||
|
Type=simple
|
||||||
|
DynamicUser=yes
|
||||||
|
|
||||||
|
StateDirectory=remote-local-storage
|
||||||
|
StateDirectoryMode=0700
|
||||||
|
WorkingDirectory=/var/lib/remote-local-storage
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/remote-local-storage -address "sysd?name=remote-local-storage.socket&idle_timeout=1h"
|
||||||
|
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
CapabilityBoundingSet=
|
||||||
|
RestrictNamespaces=true
|
||||||
|
SystemCallFilter=@system-service
|
||||||
|
ProtectProc=invisible
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateNetwork=yes
|
||||||
10
remote-local-storage.socket
Normal file
10
remote-local-storage.socket
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Socket activation for remote-local-storage
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/rls.sock
|
||||||
|
SocketGroup=caddy
|
||||||
|
SocketMode=0660
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
||||||
Reference in New Issue
Block a user