From 321c95aa571669370a79fff3b3ae84f900cbb41f Mon Sep 17 00:00:00 2001 From: fullmetal Date: Sun, 14 Jan 2024 19:24:39 -0500 Subject: [PATCH] Initial commit --- .SRCINFO | 24 ++++++++++++++++++++++ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ slskd.service | 23 +++++++++++++++++++++ slskd.sysusers | 2 ++ slskd.tmpfiles | 4 ++++ 5 files changed, 107 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 slskd.service create mode 100644 slskd.sysusers create mode 100644 slskd.tmpfiles diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000000000..4564a1d67a41f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = slskd-bin + pkgdesc = A modern client-server application for the Soulseek file-sharing network. + pkgver = 0.19.5 + pkgrel = 1 + url = https://github.com/slskd/slskd/ + arch = x86_64 + arch = aarch64 + arch = armv7h + license = AGPL3 + options = !strip + source = slskd.service + source = slskd.sysusers + source = slskd.tmpfiles + sha256sums = 4081ba91465bcd9784542d9b46313e4803ee464a0cca6c51fc3c6341d5355c01 + sha256sums = 69545412a47b0d60b4af33faf61499168016202cd1a60da0c15f17f6da3c900b + sha256sums = 2f1d645115bbcf225be3e585aaeb598f1710277f17c41c64e0308eb25b8ed4f4 + source_x86_64 = https://github.com/slskd/slskd/releases/download/0.19.5/slskd-0.19.5-linux-x64.zip + sha256sums_x86_64 = 9b135004689b4137e0e8612b9e7ca73a15119f31e34b7bf001f0fd195efc90a0 + source_aarch64 = https://github.com/slskd/slskd/releases/download/0.19.5/slskd-0.19.5-linux-arm64.zip + sha256sums_aarch64 = 42864fda749b32b9dd6286b1597182f474db6aee0a171c42891f41498495d847 + source_armv7h = https://github.com/slskd/slskd/releases/download/0.19.5/slskd-0.19.5-linux-arm.zip + sha256sums_armv7h = f243982f7d342752431436465c540fb567a4a6ed8e5c3d966a3ac30371baee03 + +pkgname = slskd-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000000000..62694617ac661 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +pkgname='slskd-bin' +pkgver=0.19.5 +pkgrel=1 +pkgdesc='A modern client-server application for the Soulseek file-sharing network.' +arch=('x86_64' 'aarch64' 'armv7h') +url='https://github.com/slskd/slskd/' +license=('AGPL3') +options=("!strip") +options=("!strip") + +depends=( +) + +optdepends=( +) + +source_x86_64=("https://github.com/slskd/slskd/releases/download/${pkgver}/slskd-${pkgver}-linux-x64.zip") +source_aarch64=("https://github.com/slskd/slskd/releases/download/${pkgver}/slskd-${pkgver}-linux-arm64.zip") +source_armv7h=("https://github.com/slskd/slskd/releases/download/${pkgver}/slskd-${pkgver}-linux-arm.zip") + +source=( + 'slskd.service' + 'slskd.sysusers' + 'slskd.tmpfiles' +) + +noextract=() +sha256sums=( + '4081ba91465bcd9784542d9b46313e4803ee464a0cca6c51fc3c6341d5355c01' + '69545412a47b0d60b4af33faf61499168016202cd1a60da0c15f17f6da3c900b' + '2f1d645115bbcf225be3e585aaeb598f1710277f17c41c64e0308eb25b8ed4f4' +) +sha256sums_x86_64=('9b135004689b4137e0e8612b9e7ca73a15119f31e34b7bf001f0fd195efc90a0') +sha256sums_aarch64=('42864fda749b32b9dd6286b1597182f474db6aee0a171c42891f41498495d847') +sha256sums_armv7h=('f243982f7d342752431436465c540fb567a4a6ed8e5c3d966a3ac30371baee03') + +pkgver() { +# cd ${pkgname} + curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep tag_name | sed 's/.*: "\([^"]\+\)".*/\1/' + # Not updating pkgver for some reason +} + +package() { + install -d -m 755 "${pkgdir}/usr/lib/slskd" + cp -dpr --no-preserve=ownership "${srcdir}/slskd" "${pkgdir}/usr/lib/slskd/" + cp -dpr --no-preserve=ownership "${srcdir}/wwwroot" "${pkgdir}/usr/lib/slskd/" + install -d "$pkgdir/usr/bin" + ln -s /usr/lib/slskd/slskd ${pkgdir}/usr/bin/slskd + + install -D -m 644 "${srcdir}/slskd.sysusers" "${pkgdir}/usr/lib/sysusers.d/slskd.conf" + install -D -m 644 "${srcdir}/slskd.service" "${pkgdir}/usr/lib/systemd/system/slskd.service" + install -D -m 644 "${srcdir}/slskd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/slskd.conf" +} + diff --git a/slskd.service b/slskd.service new file mode 100644 index 0000000000000..e12dde397111c --- /dev/null +++ b/slskd.service @@ -0,0 +1,23 @@ +# Be sure to use `systemctl edit slskd` to modify this service with an override.conf because +# direct changes will be overwritten by package updates. +# +# A user per service w/ shared group setup would have an override like: +# [Service] +# Group=sharedgroupname +# Umask=002 + +[Unit] +Description=Slskd Service +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +User=slskd +Group=slskd +SyslogIdentifier=slskd +ExecStart=/usr/lib/slskd/slskd +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/slskd.sysusers b/slskd.sysusers new file mode 100644 index 0000000000000..78c2914d49b1b --- /dev/null +++ b/slskd.sysusers @@ -0,0 +1,2 @@ +u slskd - - /var/lib/slskd +g slskd - diff --git a/slskd.tmpfiles b/slskd.tmpfiles new file mode 100644 index 0000000000000..e99b8c0886b5f --- /dev/null +++ b/slskd.tmpfiles @@ -0,0 +1,4 @@ +# Override this file with a modified version in /etc/tmpfiles.d/ +d /var/lib/slskd 0755 slskd slskd +Z /var/lib/slskd - slskd slskd +# L /var/log/slskd - - - - /var/lib/slskd/logs/