summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Taboada2020-09-10 11:39:10 -0700
committerMichael Taboada2020-09-10 11:39:10 -0700
commit7ea5d0dcab173a7e866c6818225d9be98722bc6a (patch)
tree786e49530d446e2861e12ae75f051a22151a03e7
downloadaur-7ea5d0dcab173a7e866c6818225d9be98722bc6a.tar.gz
Initial commit.
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD38
-rw-r--r--botamusique.service15
-rwxr-xr-xbotamusique.sh3
-rw-r--r--botamusique.sysusers1
-rw-r--r--botamusique.tmpfiles1
6 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8b2dd7668f8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = botamusique
+ pkgdesc = Music bot for mumble
+ pkgver = 7.0
+ pkgrel = 1
+ url = https://github.com/azlux/botamusique
+ arch = x86_64
+ arch = i686
+ arch = armv7h
+ arch = aarch64
+ license = MIT
+ makedepends = unzip
+ makedepends = python-virtualenv
+ depends = ffmpeg
+ depends = opus-tools
+ source = botamusique-7.0.zip::https://github.com/azlux/botamusique/archive/7.0.zip
+ source = botamusique.service
+ source = botamusique.sh
+ source = botamusique.sysusers
+ source = botamusique.tmpfiles
+ sha512sums = e2e90b73fc965190e20be6a18c1c162c2b9daf17caa047701988914e9c1fe261a8166b3511a9916d6cb6052da9618b9f183bde20ce1a9ff6bc77125fb576a0e9
+ sha512sums = 170943e8d36f94ab6e895f99e72bb9d9e79a123758d9e9b87367fe95e9bb0ed0e7d896d242aa52598e5007fcabd764c4b2fe741bb9e9852fb30cbab8b8b4cf32
+ sha512sums = 5059932c232c18653cc06e133c0063eb7480dba395b6dd7d1848ba90a683c2ea28306c7a35293a774b06521b2fab426df82b16a9d4bc96fca2d5f00a37f7257f
+ sha512sums = 58340821d970ff60f79969a91a263fbf7ddea78c96852c89ef1248c7783a1b6c44406427c40c1955255f27a83371c53c340f7595d436de611f0974d27b80f731
+ sha512sums = 40adb0a02fe3fe0bbe90367cb0e4bb1bb1d213570090efe519414311c37c80a5f6e7413a1c2486bb6438381db18751f52bd1b14758d7120afbe13689b970a462
+
+pkgname = botamusique
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5f1ed52da6f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Storm Dragon <stormdragon2976@gmail.com>
+# Maintainer: Michael Taboada <michael@2mb.solutions>
+
+pkgname='botamusique'
+pkgver=7.0
+pkgrel=1
+pkgdesc="Music bot for mumble"
+arch=('x86_64' 'i686' 'armv7h' 'aarch64')
+url="https://github.com/azlux/botamusique"
+license=('MIT')
+depends=('ffmpeg' 'opus-tools')
+makedepends=('unzip' 'python-virtualenv')
+source=("${pkgname}-${pkgver}.zip::https://github.com/azlux/${pkgname}/archive/${pkgver}.zip"
+"${pkgname}.service"
+"${pkgname}.sh"
+"${pkgname}.sysusers"
+"${pkgname}.tmpfiles")
+sha512sums=('e2e90b73fc965190e20be6a18c1c162c2b9daf17caa047701988914e9c1fe261a8166b3511a9916d6cb6052da9618b9f183bde20ce1a9ff6bc77125fb576a0e9'
+ '170943e8d36f94ab6e895f99e72bb9d9e79a123758d9e9b87367fe95e9bb0ed0e7d896d242aa52598e5007fcabd764c4b2fe741bb9e9852fb30cbab8b8b4cf32'
+ '5059932c232c18653cc06e133c0063eb7480dba395b6dd7d1848ba90a683c2ea28306c7a35293a774b06521b2fab426df82b16a9d4bc96fca2d5f00a37f7257f'
+ '58340821d970ff60f79969a91a263fbf7ddea78c96852c89ef1248c7783a1b6c44406427c40c1955255f27a83371c53c340f7595d436de611f0974d27b80f731'
+ '40adb0a02fe3fe0bbe90367cb0e4bb1bb1d213570090efe519414311c37c80a5f6e7413a1c2486bb6438381db18751f52bd1b14758d7120afbe13689b970a462')
+
+package() {
+mkdir -p "${pkgdir}/opt/${pkgname}"
+cp -r "${pkgname}-${pkgver}" "${pkgdir}/opt/${pkgname}/${pkgname}"
+mkdir -p "${pkgdir}/usr/lib/systemd/system"
+install -Dm644 ${pkgname}.service "${pkgdir}/usr/lib/systemd/system"
+mkdir -p "${pkgdir}/usr/bin"
+install -Dm755 "${pkgname}.sh" "${pkgdir}/usr/bin/botamusique"
+mkdir -p "${pkgdir}/usr/lib/sysusers.d"
+install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+mkdir -p "${pkgdir}/usr/lib/tmpfiles.d"
+install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+cd "${pkgdir}/opt/${pkgname}"
+ virtualenv .venv
+.venv/bin/pip install -r ${pkgname}/requirements.txt
+}
diff --git a/botamusique.service b/botamusique.service
new file mode 100644
index 00000000000..8984a8b0c56
--- /dev/null
+++ b/botamusique.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Botamusique mumble bot
+After=network-online.target
+
+[Service]
+ExecStart=/usr/bin/botamusique
+Restart=always
+Type=simple
+RestartSec=15s
+WorkingDirectory=/opt/botamusique/botamusique
+User=botamusique
+Group=botamusique
+
+[Install]
+WantedBy=multi-user.target
diff --git a/botamusique.sh b/botamusique.sh
new file mode 100755
index 00000000000..c382a47f280
--- /dev/null
+++ b/botamusique.sh
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+/opt/botamusique/.venv/bin/python /opt/botamusique/botamusique/mumbleBot.py "$@"
diff --git a/botamusique.sysusers b/botamusique.sysusers
new file mode 100644
index 00000000000..61d69414f41
--- /dev/null
+++ b/botamusique.sysusers
@@ -0,0 +1 @@
+u botamusique - "botamusique privilege separation" /opt/botamusique/botamusique
diff --git a/botamusique.tmpfiles b/botamusique.tmpfiles
new file mode 100644
index 00000000000..5d6a88bf15b
--- /dev/null
+++ b/botamusique.tmpfiles
@@ -0,0 +1 @@
+Z /opt/botamusique 0755 botamusique botamusique