aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sopel
diff options
context:
space:
mode:
authorKevin Daudt <ops@ikke.info>2018-09-17 19:11:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-27 06:18:40 +0000
commit422b2f5e642bb718b7c6ca5bba9286d0b94719e5 (patch)
tree6c3963e68bdbd59f8407569910b61121058ef4ab /testing/sopel
parent9784b9555bb99f9ee7ad5cc08d3c2875d3482ad4 (diff)
downloadaports-422b2f5e642bb718b7c6ca5bba9286d0b94719e5.tar.bz2
aports-422b2f5e642bb718b7c6ca5bba9286d0b94719e5.tar.xz
testing/sopel: new aport
Diffstat (limited to 'testing/sopel')
-rw-r--r--testing/sopel/APKBUILD44
-rw-r--r--testing/sopel/sopel.conf1
-rw-r--r--testing/sopel/sopel.initd11
-rw-r--r--testing/sopel/sopel.pre-install6
4 files changed, 62 insertions, 0 deletions
diff --git a/testing/sopel/APKBUILD b/testing/sopel/APKBUILD
new file mode 100644
index 0000000000..540b91c752
--- /dev/null
+++ b/testing/sopel/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
+# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
+pkgname=sopel
+pkgver=6.5.3
+pkgrel=0
+pkgdesc="An easy-to-use and highly extensible IRC Bot framework"
+url="https://sopel.chat/"
+arch="noarch"
+license="EFL-2.0"
+depends="python3 ipython py3-requests py3-geoip py3-setuptools py3-enchant
+ py3-xmltodict py3-praw py3-tz"
+checkdepends="py3-pytest"
+install="$pkgname.pre-install"
+pkgusers="sopel"
+pkggroups="sopel"
+subpackages="$pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/sopel-irc/sopel/archive/v6.5.3.tar.gz
+ sopel.initd
+ sopel.conf"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+
+ python3 pytest_run.py sopel test
+}
+
+package() {
+ cd "$builddir"
+
+ python3 setup.py install --root="$pkgdir"
+ install -Dm0755 "$srcdir"/sopel.initd "$pkgdir"/etc/init.d/sopel
+ install -Dm0644 "$srcdir"/sopel.conf "$pkgdir"/etc/conf.d/sopel
+}
+
+sha512sums="6f8f3003c87f8092a7a05320197237033f8d650402155f1f71482078e2bb851aa5f1942d2ccf378d3446011326f174087f478754e212b40e2216e2ad46a82812 sopel-6.5.3.tar.gz
+1d6b39697d767085530f1db5ba763554c6503ab82b792bdb48c7fef65e4424fe30740ab758ebd3f1ccdd6f2340a9ac9e3dfe44fff064969106717169160ece7b sopel.initd
+d90379dc5a2d8c8ff52a15d1c341d4cbad919707fadc578d4ae78db45efafad5e6add270876aa982086ac78d99729b0346aa565512190b9fc8cd77020ba91445 sopel.conf"
diff --git a/testing/sopel/sopel.conf b/testing/sopel/sopel.conf
new file mode 100644
index 0000000000..38995b053a
--- /dev/null
+++ b/testing/sopel/sopel.conf
@@ -0,0 +1 @@
+CONFIG_PATH=/etc/sopel/default.cfg
diff --git a/testing/sopel/sopel.initd b/testing/sopel/sopel.initd
new file mode 100644
index 0000000000..bc616a97e1
--- /dev/null
+++ b/testing/sopel/sopel.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+
+command="/usr/bin/sopel"
+command_args="-c $CONFIG_PATH"
+pidfile="/run/sopel.pid"
+command_background=true
+command_user="sopel:sopel"
+
+depend() {
+ need net
+}
diff --git a/testing/sopel/sopel.pre-install b/testing/sopel/sopel.pre-install
new file mode 100644
index 0000000000..7e7ae1039e
--- /dev/null
+++ b/testing/sopel/sopel.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S sopel 2>/dev/null
+adduser -S -D -H -h/dev/null -s/sbin/nologin -G sopel -g sopel sopel 2>/dev/null
+
+exit 0