summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLancelot Owczarczak2023-12-22 15:47:37 +0100
committerLancelot Owczarczak2023-12-22 15:47:37 +0100
commit55b44fd0da0320f7ac28981ca1ac54a443fe834d (patch)
tree4c31e04ea607cf6afb2b183d56f06cc947538a63
downloadaur-minimal-twitch-client.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD31
-rw-r--r--set-chat-key-to-f12.patch5
-rw-r--r--use-source-file-path-to-asset.patch9
5 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2c04a30a3dec
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = minimal-twitch-client
+ pkgdesc = A minimal GTK stream viewer for youtube and twitch
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/lowczarc/minimal-twitch-client
+ arch = x86_64
+ license = custom
+ depends = python3
+ depends = python-vlc
+ depends = streamlink
+ depends = gtk3
+ source = https://github.com/lowczarc/minimal-twitch-client/archive/refs/tags/v1.0.0.zip
+ source = set-chat-key-to-f12.patch
+ source = use-source-file-path-to-asset.patch
+ sha256sums = b12f8829193c6da0cfd7ae605edcf8ed0c86ed0ce3162e7c5c2f95b0de9093d6
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = minimal-twitch-client
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..d4055ef0da4b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.pkg.tar.zst
+*.zip
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..19f1a9aa770d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Lancelot OWCZARCZAK <lancelot@owczarczak.fr>
+
+pkgname=minimal-twitch-client
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="A minimal GTK stream viewer for youtube and twitch"
+arch=('x86_64')
+url='https://github.com/lowczarc/minimal-twitch-client'
+license=('custom')
+depends=(python3 python-vlc streamlink gtk3)
+source=(
+ "https://github.com/lowczarc/minimal-twitch-client/archive/refs/tags/v1.0.0.zip"
+ "set-chat-key-to-f12.patch"
+ "use-source-file-path-to-asset.patch"
+ )
+
+sha256sums=("b12f8829193c6da0cfd7ae605edcf8ed0c86ed0ce3162e7c5c2f95b0de9093d6" "SKIP" "SKIP")
+
+prepare() {
+ patch "$srcdir"/minimal-twitch-client-$pkgver/lib/app.py "$srcdir"/set-chat-key-to-f12.patch
+ patch "$srcdir"/minimal-twitch-client-$pkgver/lib/app.py "$srcdir"/use-source-file-path-to-asset.patch
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ find lib/ assets/ -type f -exec install -Dm 644 "{}" "$pkgdir/usr/lib/$pkgname/{}" \;
+ install -Dm 755 stream_client "$pkgdir/usr/lib/$pkgname/stream_client"
+ mkdir -p "$pkgdir"/usr/bin
+ ln -s ../lib/$pkgname/stream_client "$pkgdir"/usr/bin/minimal-twitch-client
+ ln -s ../lib/$pkgname/stream_client "$pkgdir"/usr/bin/twitch
+}
diff --git a/set-chat-key-to-f12.patch b/set-chat-key-to-f12.patch
new file mode 100644
index 000000000000..d4e0b484f9a7
--- /dev/null
+++ b/set-chat-key-to-f12.patch
@@ -0,0 +1,5 @@
+89c89
+< if event.keyval == 269025072:
+---
+> if event.keyval == 269025072 or event.keyval == 65481:
+
diff --git a/use-source-file-path-to-asset.patch b/use-source-file-path-to-asset.patch
new file mode 100644
index 000000000000..c4b768df0749
--- /dev/null
+++ b/use-source-file-path-to-asset.patch
@@ -0,0 +1,9 @@
+2a3
+> import os
+8,9c9,11
+< _GLADE_FILE = "assets/UI.glade"
+< _STYLE_FILE = "assets/UI.css"
+---
+> dir_path = os.path.dirname(os.path.realpath(__file__))
+> _GLADE_FILE = dir_path + "/../assets/UI.glade"
+> _STYLE_FILE = dir_path + "/../assets/UI.css"