From be322094e2ff4cf578c77e33d0c8a1e520408837 Mon Sep 17 00:00:00 2001 From: nxshock Date: Sat, 3 Apr 2021 19:16:50 +0500 Subject: [PATCH 1/3] Add user file for systemd --- contrib/systemd/alfis.sysusers | 1 + 1 file changed, 1 insertion(+) create mode 100644 contrib/systemd/alfis.sysusers diff --git a/contrib/systemd/alfis.sysusers b/contrib/systemd/alfis.sysusers new file mode 100644 index 0000000..7fb2bcb --- /dev/null +++ b/contrib/systemd/alfis.sysusers @@ -0,0 +1 @@ +u alfis - "alfis user" From c028296d48239c7d247338928ab0a05ae680de8d Mon Sep 17 00:00:00 2001 From: nxshock Date: Sat, 3 Apr 2021 19:17:06 +0500 Subject: [PATCH 2/3] Add creation of working dir for systemd --- contrib/systemd/alfis.tmpfiles | 1 + 1 file changed, 1 insertion(+) create mode 100644 contrib/systemd/alfis.tmpfiles diff --git a/contrib/systemd/alfis.tmpfiles b/contrib/systemd/alfis.tmpfiles new file mode 100644 index 0000000..5cc1530 --- /dev/null +++ b/contrib/systemd/alfis.tmpfiles @@ -0,0 +1 @@ +d /var/lib/alfis 700 alfis alfis From 67231104750df24dd436523056f511798b0ab3b7 Mon Sep 17 00:00:00 2001 From: nxshock Date: Sat, 3 Apr 2021 19:17:24 +0500 Subject: [PATCH 3/3] Add systemd service for PKGBUILD --- contrib/PKGBUILD | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/contrib/PKGBUILD b/contrib/PKGBUILD index 9c02053..f62d235 100644 --- a/contrib/PKGBUILD +++ b/contrib/PKGBUILD @@ -7,11 +7,23 @@ license=('AGPL3') url='https://github.com/Revertron/Alfis' depends=('webkit2gtk') backup=("etc/$pkgname.conf") -source=("https://github.com/Revertron/Alfis/releases/download/v${pkgver}/alfis-linux-amd64-v${pkgver}.zip") -sha256sums=('SKIP') +source=("https://github.com/Revertron/Alfis/releases/download/v$pkgver/alfis-linux-amd64-v$pkgver.zip" + 'https://raw.githubusercontent.com/Revertron/Alfis/master/contrib/systemd/alfis.service' + 'https://raw.githubusercontent.com/Revertron/Alfis/master/contrib/systemd/alfis.sysusers' + 'https://raw.githubusercontent.com/Revertron/Alfis/master/contrib/systemd/alfis.tmpfiles' +) +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' +) package() { cd "$srcdir" install -Dm 755 "$pkgname" "$pkgdir/usr/bin/$pkgname" - install -Dm 644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf" + install -Dm 644 "$pkgname.toml" "$pkgdir/etc/$pkgname.conf" + + install -Dm 644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" + install -Dm 644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + install -Dm 644 "$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" }