diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-04-06 19:46:58 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-04-12 01:11:52 -0400 |
commit | 0019869f5b92c731ff85e8d3074e03f1a82163a5 (patch) | |
tree | 806ad5be448d428eab4c508122c033a9b0b51196 /pcr | |
parent | 5571a7f59ee3bee87ab45d4d2c983c6251c2f066 (diff) | |
download | abslibre-0019869f5b92c731ff85e8d3074e03f1a82163a5.tar.gz abslibre-0019869f5b92c731ff85e8d3074e03f1a82163a5.tar.bz2 abslibre-0019869f5b92c731ff85e8d3074e03f1a82163a5.zip |
[gmid]: add package
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/gmid/PKGBUILD | 78 | ||||
-rw-r--r-- | pcr/gmid/gmid.conf | 7 | ||||
-rw-r--r-- | pcr/gmid/gmid.confd | 1 | ||||
-rw-r--r-- | pcr/gmid/gmid.initd | 20 | ||||
-rw-r--r-- | pcr/gmid/gmid.install | 4 | ||||
-rw-r--r-- | pcr/gmid/gmid.service | 27 | ||||
-rw-r--r-- | pcr/gmid/gmid.sysusers | 1 | ||||
-rw-r--r-- | pcr/gmid/index.gmi | 10 |
8 files changed, 148 insertions, 0 deletions
diff --git a/pcr/gmid/PKGBUILD b/pcr/gmid/PKGBUILD new file mode 100644 index 000000000..2a160eab6 --- /dev/null +++ b/pcr/gmid/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer (aur): Andrea Feletto <andrea@andreafeletto.com> +# Maintainer: Wael Karram <wael@waelk.tech> +# Contributor: bill-auger <bill-auger@programmer.net> + + +# parabola changes and rationale: +# - delete unlicensed files + + +pkgname=gmid +pkgver=1.8.3 +pkgrel=2 +pkgdesc='Fast Gemini server written with security in mind.' +arch=('x86_64') +arch+=('i686' 'armv7h') +url='https://gmid.omarpolo.com' +license=('custom:ISC') +install=${pkgname}.install +backup=(etc/conf.d/${pkgname} + etc/${pkgname}.conf) +depends=('libretls' 'libevent') +mksource=(https://github.com/omar-polo/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz) +source=( + https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.xz{,.sig} + "gmid.service" + "gmid.sysusers" + "gmid.confd" + "gmid.initd" + "gmid.conf" + "index.gmi" +) +mksha256sums=('f7b6cc1deaea6c5242301fa7440c0f5caaf282fea780ba1edcef480f7fa67fe1') +sha256sums=( + '5a7ad3ef93434b8a42f18bffe93444de9d30360e4c799dcadac844374e2046ca' + 'SKIP' + '946de0766343225068a0e3f38cb39a4a93ef312525dd775226b938cd08706b94' + '4d943727a57dbf5f246963c0f90ccc54919cc2296538457e6b16f29f7580d9d6' + 'eddbe93741d01077426bc0239db42815c75a0da5191b4e6528df60ae3e0e5bb3' + '3da15797a8771831b950b246dcd4782a58db68be10fbbc519dbbc758dd336a94' + '2e2b001ee1dc9d42def2d3f68fbe900f1043244c4c3402b15f54d9e091ff9a7e' + 'bea228ba92a03b5f0462f54bac69a47f7d063c08830a7721503b7841da6845c0' + +) +validpgpkeys=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger + + +mksource() { + cd "$srcdir/$pkgname-$pkgver" + + # Remove unlicensed files. + rm -r contrib + rm -r site +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + MANDIR='usr/share/man/' ./configure --prefix='usr/' + make +} + +package() { + # Install the config and service files. + cd "$srcdir" + install -Dm644 gmid.service -t "$pkgdir/usr/lib/systemd/system" + install -Dm644 gmid.sysusers -t "$pkgdir/usr/lib/sysusers.d" + install -Dm644 gmid.confd "$pkgdir/etc/conf.d/gmid" + install -Dm755 gmid.initd "$pkgdir/etc/init.d/gmid" + install -Dm644 gmid.conf "$pkgdir/etc/gmid.conf" + + # Install the program files. + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + + # Install the documentation files. + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" + install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname" + install -Dm644 ../index.gmi "$pkgdir/usr/share/doc/$pkgname/index.gmi" +} diff --git a/pcr/gmid/gmid.conf b/pcr/gmid/gmid.conf new file mode 100644 index 000000000..24fe70971 --- /dev/null +++ b/pcr/gmid/gmid.conf @@ -0,0 +1,7 @@ +user "gmid" + +server "localhost" { + cert "/etc/ssl/certs/gmid.pem" + key "/etc/ssl/private/gmid.key" + root "/srv/gemini/" +} diff --git a/pcr/gmid/gmid.confd b/pcr/gmid/gmid.confd new file mode 100644 index 000000000..c58748f61 --- /dev/null +++ b/pcr/gmid/gmid.confd @@ -0,0 +1 @@ +GMID_USER='gmid' diff --git a/pcr/gmid/gmid.initd b/pcr/gmid/gmid.initd new file mode 100644 index 000000000..e0b8afded --- /dev/null +++ b/pcr/gmid/gmid.initd @@ -0,0 +1,20 @@ +#!/usr/bin/openrc-run + +depend() { + need net + after logger +} + +start() { + ebegin "Starting gmid" + start-stop-daemon --start --background --user ${GMID_USER} --name gmid \ + --make-pidfile --pidfile /run/gmid.pid \ + --exec /usr/bin/gmid -- -f -c /etc/gmid.conf + eend $? +} + +stop() { + ebegin "Stopping gmid" + start-stop-daemon --stop --pidfile /run/gmid.pid --user ${GMID_USER} + eend $? +} diff --git a/pcr/gmid/gmid.install b/pcr/gmid/gmid.install new file mode 100644 index 000000000..39c649be7 --- /dev/null +++ b/pcr/gmid/gmid.install @@ -0,0 +1,4 @@ +post_install() { + echo " ==> 'gmid' requires manual configuration and an SSL cert" + echo " see: https://wiki.parabola.nu/Gmid" +} diff --git a/pcr/gmid/gmid.service b/pcr/gmid/gmid.service new file mode 100644 index 000000000..bba037bf5 --- /dev/null +++ b/pcr/gmid/gmid.service @@ -0,0 +1,27 @@ +[Unit] +Description=gmid Gemini daemon +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=10 +StandardOutput=journal +StandardError=inherit +SyslogIdentifier=gmid +ProtectSystem=strict +ProtectHome=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectControlGroups=true + +[Install] +WantedBy=multi-user.target diff --git a/pcr/gmid/gmid.sysusers b/pcr/gmid/gmid.sysusers new file mode 100644 index 000000000..fb0a75827 --- /dev/null +++ b/pcr/gmid/gmid.sysusers @@ -0,0 +1 @@ +u gmid - "gmid Gemini server" - -
\ No newline at end of file diff --git a/pcr/gmid/index.gmi b/pcr/gmid/index.gmi new file mode 100644 index 000000000..c642a65c0 --- /dev/null +++ b/pcr/gmid/index.gmi @@ -0,0 +1,10 @@ +# Gemini sample index page + +Welcome to my gemini site! + +## Links + +=> gemini://gemini.circumlunar.space/docs/gemtext.gmi "gemtext" Markdown primer +=> gemini://gemini.parabola.nu Parabola GNU/Linux-libre (gemini interface) +=> gopher://gopher.parabola.nu Parabola GNU/Linux-libre (gopher interface) +=> https://www.parabola.nu Parabola GNU/Linux-libre (www interface) |