summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMidAutumnMoon2021-02-04 14:43:54 +0800
committerMidAutumnMoon2021-02-04 14:43:54 +0800
commit910d90d5882f8105d84c7231c0d49d22ae640653 (patch)
treee53c9567ebd3e3856b69b14d374850f357ce9180
downloadaur-910d90d5882f8105d84c7231c0d49d22ae640653.tar.gz
Ready to publish package.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD31
-rw-r--r--agate.conf9
-rw-r--r--agate.sysusers1
-rw-r--r--agate@.service14
5 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..72ef6e231708
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = agate-bin
+ pkgdesc = Very simple server for the Gemini hypertext protocol.
+ pkgver = 2.3.0
+ pkgrel = 1
+ url = https://github.com/mbrubeck/agate
+ arch = x86_64
+ license = APACHE
+ license = MIT
+ conflicts = agate
+ backup = etc/agate.conf
+ source = https://github.com/mbrubeck/agate/releases/download/v2.3.0/agate.x86_64-unknown-linux-gnu.gz
+ source = agate@.service
+ source = agate.conf
+ source = agate.sysusers
+ md5sums = ffddb0ff70cef9258c12fff043e71558
+ md5sums = 839a3f9c3dcd263d0b672e7c4b7f0576
+ md5sums = f20ec61e69f2a2432c742275542c03a9
+ md5sums = f3aff0c50b6af48da0bbb37d2c8a1b07
+
+pkgname = agate-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..19462fb45215
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: MidAutumnMoon <mid.autumn0moon@gmail.com>
+
+pkgname=agate-bin
+pkgver=2.3.0
+pkgrel=1
+pkgdesc="Very simple server for the Gemini hypertext protocol."
+arch=( 'x86_64' )
+url="https://github.com/mbrubeck/agate"
+license=( 'APACHE' 'MIT' )
+
+source=(
+ https://github.com/mbrubeck/agate/releases/download/v${pkgver}/agate.x86_64-unknown-linux-gnu.gz
+ agate@.service
+ agate.conf
+ agate.sysusers
+)
+md5sums=( 'ffddb0ff70cef9258c12fff043e71558'
+ '839a3f9c3dcd263d0b672e7c4b7f0576'
+ 'f20ec61e69f2a2432c742275542c03a9'
+ 'f3aff0c50b6af48da0bbb37d2c8a1b07' )
+backup=( 'etc/agate.conf' )
+
+conflicts=( 'agate' )
+
+package() {
+ install -m644 "${srcdir}/agate.conf" "${pkgdir}/etc/agate.conf"
+ install -m644 "${srcdir}/agate.service" "${pkgdir}/usr/lib/systemd/system/agate.service"
+ install -m644 "${srcdir}/agate.sysusers" "${pkgdir}/usr/lib/sysusers.d/agate.conf"
+
+ install -m755 "${srcdir}/agate.x86_64-unknown-linux-gnu" "${pkgdir}/usr/bin/agate"
+}
diff --git a/agate.conf b/agate.conf
new file mode 100644
index 000000000000..e8492819b8dd
--- /dev/null
+++ b/agate.conf
@@ -0,0 +1,9 @@
+# See agate homepage https://github.com/mbrubeck/agate
+
+CONTENT=--content /var/agate/content/
+CERT=--key /var/agate/key.rsa --cert /var/agate/cert.pem
+ADDR=--addr :::1965 --addr 0.0.0.0:1965
+HOSTNAME=--hostname example.com
+LANG=--lang en_US
+
+#OTHERS=--serve-secret
diff --git a/agate.sysusers b/agate.sysusers
new file mode 100644
index 000000000000..d3aa3abfe605
--- /dev/null
+++ b/agate.sysusers
@@ -0,0 +1 @@
+u agate - "agate user" /var/agate
diff --git a/agate@.service b/agate@.service
new file mode 100644
index 000000000000..8e2aa530bd8e
--- /dev/null
+++ b/agate@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Very simple server for the Gemini hypertext protocol.
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+User=agate
+EnvironmentFile=%i
+ExecStart=/usr/bin/agate $CONTENT $CERT $ADDR $HOSTNAME $LANG $OTHERS
+Restart=always
+
+[Install]
+WantedBy=multi-user.target