summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Feletto2022-03-14 17:02:40 +0100
committerAndrea Feletto2022-03-14 17:02:40 +0100
commit8432689b101b93366fcb6a82259503a6f6a0396c (patch)
tree6a905a792a66c581b44b3a68e6b0aaaeb66979d8
parentaa914fb626eee3d7e9cc8f86e080aba7b58881e3 (diff)
downloadaur-8432689b101b93366fcb6a82259503a6f6a0396c.tar.gz
add service and sysusers files
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD19
-rw-r--r--gmid.conf1
-rwxr-xr-xgmid.service22
4 files changed, 44 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c67ee59510ea..c23ca53981b3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,18 @@
pkgbase = gmid
pkgdesc = Fast Gemini server written with security in mind.
pkgver = 1.8.1
- pkgrel = 2
+ pkgrel = 3
url = https://gmid.omarpolo.com
arch = x86_64
license = ISC
depends = libretls
conflicts = gmid-git
conflicts = gmid-bin
- source = https://git.omarpolo.com/gmid/snapshot/gmid-1.8.1.tar.gz
+ source = https://gmid.omarpolo.com/gmid/snapshot/gmid-1.8.1.tar.gz
+ source = gmid.service
+ source = gmid.conf
sha256sums = b4c5bf614b910cb9e8f529e119e395e7bb5d6fffe305cf3994598d6e6a448b8e
+ sha256sums = 61450ba6fb7283b03f099e5172cf4e64bf40093ad2bd126b7915940d40922c9a
+ sha256sums = 4d943727a57dbf5f246963c0f90ccc54919cc2296538457e6b16f29f7580d9d6
pkgname = gmid
diff --git a/PKGBUILD b/PKGBUILD
index 2e038593afda..37d87fe57005 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,23 @@
pkgname=gmid
pkgver=1.8.1
-pkgrel=2
+pkgrel=3
pkgdesc='Fast Gemini server written with security in mind.'
arch=('x86_64')
url='https://gmid.omarpolo.com'
license=('ISC')
depends=('libretls')
conflicts=('gmid-git' 'gmid-bin')
-source=("https://git.omarpolo.com/$pkgname/snapshot/$pkgname-$pkgver.tar.gz")
-sha256sums=('b4c5bf614b910cb9e8f529e119e395e7bb5d6fffe305cf3994598d6e6a448b8e')
+source=(
+ "$url/$pkgname/snapshot/$pkgname-$pkgver.tar.gz"
+ "gmid.service"
+ "gmid.conf"
+)
+sha256sums=(
+ 'b4c5bf614b910cb9e8f529e119e395e7bb5d6fffe305cf3994598d6e6a448b8e'
+ '61450ba6fb7283b03f099e5172cf4e64bf40093ad2bd126b7915940d40922c9a'
+ '4d943727a57dbf5f246963c0f90ccc54919cc2296538457e6b16f29f7580d9d6'
+)
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -20,11 +28,14 @@ build() {
}
package() {
+ cd "$srcdir"
+ install -Dm644 gmid.service -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm644 gmid.conf -t "$pkgdir/usr/lib/sysusers.d"
+
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
install -Dm755 contrib/gencert -t "$pkgdir/usr/share/$pkgname"
install -Dm755 contrib/renew-certs -t "$pkgdir/usr/share/$pkgname"
- install -Dm644 contrib/gmid.service -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
diff --git a/gmid.conf b/gmid.conf
new file mode 100644
index 000000000000..fb0a75827da9
--- /dev/null
+++ b/gmid.conf
@@ -0,0 +1 @@
+u gmid - "gmid Gemini server" - - \ No newline at end of file
diff --git a/gmid.service b/gmid.service
new file mode 100755
index 000000000000..0cb2bd506efd
--- /dev/null
+++ b/gmid.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=The gmid Gemini server
+Documentation=https://gmid.omarpolo.com/
+Documentation=man:gg(1) man:gmid(1)
+After=network-online.target syslog.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=gmid
+Group=nobody
+ExecStart=/usr/bin/gmid -f -c /etc/gmid.conf
+ExecStop=/bin/kill -TERM $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+RestartSec=30
+StandardOutput=journal
+StandardError=inherit
+SyslogIdentifier=gmid
+
+[Install]
+WantedBy=multi-user.target