syncclipboard-server: 2.8.6-1

This commit is contained in:
devome 2024-10-25 15:42:05 +08:00
commit 95ef7af76b
6 changed files with 94 additions and 0 deletions

23
.SRCINFO Normal file
View file

@ -0,0 +1,23 @@
pkgbase = syncclipboard-server
pkgdesc = Cross-Platform Cipboard Syncing Solution (Server)
pkgver = 2.8.6
pkgrel = 1
url = https://github.com/Jeric-X/SyncClipboard
arch = x86_64
arch = i686
arch = aarch64
license = MIT
makedepends = dotnet-sdk-6.0
depends = aspnet-runtime-6.0
backup = etc/syncclipboard/appsettings.json
backup = etc/syncclipboard/appsettings.Development.json
source = syncclipboard-2.8.6.tar.gz::https://github.com/Jeric-X/SyncClipboard/archive/refs/tags/v2.8.6.tar.gz
source = syncclipboard.service
source = syncclipboard.sysusers
source = syncclipboard.tmpfiles
sha256sums = 86ec9ad907d2432d3250a95794147e8b6e639d80e27ed023b2d8913388212992
sha256sums = 39543906762fa52358b57f8450e57d007c860c862e400a839e72f0e5b6fa44ef
sha256sums = c926ecd545f945ac27cf4b2e54004f0d6847d58f012b9dda5b4e8416523e991c
sha256sums = bf6ce00dbedafc8b2874818138c37d8371cb165721c5b88293c64f216cee1c66
pkgname = syncclipboard-server

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/pkg
/src
*.tar.gz
*.pkg.tar.*

49
PKGBUILD Normal file
View file

@ -0,0 +1,49 @@
# Maintainer: Lonny Wong <lonnywong@qq.com>
_netver=6.0
_reponame=SyncClipboard
_pkgname="${_reponame,,}"
pkgname="${_pkgname}-server"
pkgver=2.8.6
pkgrel=1
pkgdesc="Cross-Platform Cipboard Syncing Solution (Server)"
arch=("x86_64" "i686" "aarch64")
url="https://github.com/Jeric-X/${_reponame}"
license=("MIT")
depends=("aspnet-runtime-${_netver}")
makedepends=("dotnet-sdk-${_netver}")
backup=("etc/${_pkgname}/"appsettings{,.Development}.json)
source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
"${_pkgname}.service"
"${_pkgname}.sysusers"
"${_pkgname}.tmpfiles")
sha256sums=('86ec9ad907d2432d3250a95794147e8b6e639d80e27ed023b2d8913388212992'
'39543906762fa52358b57f8450e57d007c860c862e400a839e72f0e5b6fa44ef'
'c926ecd545f945ac27cf4b2e54004f0d6847d58f012b9dda5b4e8416523e991c'
'bf6ce00dbedafc8b2874818138c37d8371cb165721c5b88293c64f216cee1c66')
build() {
cd "${_reponame}-${pkgver}"
## build server
echo "Build server..."
rm -rf server appsettings* &>/dev/null
dotnet restore "src/${_reponame}.Server"
dotnet publish "src/${_reponame}.Server/${_reponame}.Server.csproj" --configuration Release --no-restore
cp -r "src/${_reponame}.Server/bin/Release/net${_netver}/publish" server
mv server/appsettings* .
}
package() {
install -Dm644 "${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
install -Dm644 "${_pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
install -Dm644 "${_pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
cd "${_reponame}-${pkgver}"
install -Dm644 *.md docs/*.md -t "${pkgdir}/usr/share/doc/${_pkgname}-server"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}-server/LICENSE"
install -Dm644 appsettings*.json -t "${pkgdir}/etc/${_pkgname}"
install -dm755 "${pkgdir}/usr/"{bin,share/"${_pkgname}"}
cp -r --preserve=mode server "${pkgdir}/usr/share/${_pkgname}/server"
ln -sf "/usr/share/${_pkgname}/server/${_reponame}.Server" "${pkgdir}/usr/bin/${_pkgname}-server"
}

13
syncclipboard.service Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description = SyncClipboard Server
Wants = network-online.target
After = network-online.target
[Service]
User = syncclipboard
Restart = on-failure
WorkingDirectory = /var/lib/syncclipboard
ExecStart = /usr/bin/syncclipboard-server --contentRoot /var/lib/syncclipboard
[Install]
WantedBy = multi-user.target

1
syncclipboard.sysusers Normal file
View file

@ -0,0 +1 @@
u "syncclipboard" - "SyncClipboard Server" - -

4
syncclipboard.tmpfiles Normal file
View file

@ -0,0 +1,4 @@
d /var/lib/syncclipboard 0755 syncclipboard syncclipboard - -
L+ /var/lib/syncclipboard/appsettings.json - syncclipboard syncclipboard - /etc/syncclipboard/appsettings.json
L+ /var/lib/syncclipboard/appsettings.Development.json - syncclipboard syncclipboard - /etc/syncclipboard/appsettings.Development.json
Z /var/lib/syncclipboard - syncclipboard syncclipboard - -