summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHunter Peavey2021-01-15 22:35:34 -0800
committerHunter Peavey2021-01-15 22:35:34 -0800
commit7d1110bb575ec87be8155559383e93f21f35aedd (patch)
tree6cd8666c4745faed90802db3dc36b655a2da65ec
parent84c42df5dcab96853904c1887e09fd8183c3aa7e (diff)
downloadaur-7d1110bb575ec87be8155559383e93f21f35aedd.tar.gz
Apply patch from Pierre Choffet and apply Google Shell style guide; add shellcheck stuffs
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD32
-rw-r--r--gmnisrv.service10
4 files changed, 44 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4cb0ec8d75..a12523f98da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gmnisrv-git
pkgdesc = A high-performance Gemini server for POSIX systems
- pkgver = r58.70fadc2
- pkgrel = 2
+ pkgver = r88.fbef1d3
+ pkgrel = 1
url = https://git.sr.ht/~sircmpwn/gmnisrv
arch = any
license = GPL
@@ -10,7 +10,9 @@ pkgbase = gmnisrv-git
depends = openssl
depends = mailcap
source = gmnisrv::git+https://git.sr.ht/~sircmpwn/gmnisrv
+ source = gmnisrv.service
md5sums = SKIP
+ md5sums = d6c15f32c646a89f85e5b19e83756146
pkgname = gmnisrv-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..485c8507e67
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!PKGBUILD
+!.gitignore
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index c7dc569d743..10ee8a65f9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,47 @@
+#!/usr/bin/env bash
+# shellcheck disable=2034,2154
# Maintainer: Hunter Peavey < printf "srht@die.bots" | sed "s/die.bots/krathalan.net/g" >
+# Contributor: Pierre Choffet
pkgname=gmnisrv-git
_pkgname=gmnisrv
-pkgrel=2
-pkgver=r58.70fadc2
+pkgrel=1
+pkgver=r88.fbef1d3
pkgdesc="A high-performance Gemini server for POSIX systems"
url="https://git.sr.ht/~sircmpwn/gmnisrv"
arch=("any")
license=("GPL")
-source=("gmnisrv::git+${url}")
depends=("openssl" "mailcap")
makedepends=("git" "scdoc")
+source=("gmnisrv::git+${url}" gmnisrv.service)
+md5sums=('SKIP'
+ 'd6c15f32c646a89f85e5b19e83756146')
+
pkgver() {
- cd "${_pkgname}"
+ cd "${_pkgname}" || exit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd "${_pkgname}"
+ cd "${_pkgname}" || exit
- mkdir build && cd build
+ mkdir build
+ cd build || exit
../configure --prefix=/usr
make PREFIX="/usr"
}
package() {
- cd gmnisrv/build
+ cd "${_pkgname}/build" || exit
make PREFIX="/usr" DESTDIR="$pkgdir" install
-}
-md5sums=('SKIP')
+ # Move conf file into etc
+ mkdir "${pkgdir}/etc"
+ mv "${pkgdir}/usr/share/gmnisrv/gmnisrv.ini" "${pkgdir}/etc"
+ rmdir "${pkgdir}/usr/share/gmnisrv"
+
+ # Copy systemd service
+ mkdir -p "${pkgdir}/usr/lib/systemd/system"
+ cp "${srcdir}/gmnisrv.service" "${pkgdir}/usr/lib/systemd/system"
+}
diff --git a/gmnisrv.service b/gmnisrv.service
new file mode 100644
index 00000000000..b4c24bc1f3a
--- /dev/null
+++ b/gmnisrv.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Gemini Server
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/gmnisrv
+
+[Install]
+WantedBy=multi-user.target