summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorselpats2022-03-09 14:53:15 +0400
committerselpats2022-03-09 14:53:15 +0400
commit3ae72bec44aea5d260207f4cea49bc6c2c3bddde (patch)
tree30182e8e109b9be2f4a734a53067fb8ee531d81d
downloadaur-3ae72bec44aea5d260207f4cea49bc6c2c3bddde.tar.gz
init commit
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD31
-rw-r--r--binary_path.patch11
3 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d437a8d8987c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = mpv-discord-git
+ pkgdesc = A cross-platform Discord Rich Presence integration for mpv
+ pkgver = 1.6.1.r0.g861bfe5
+ pkgrel = 1
+ url = https://github.com/tnychn/mpv-discord
+ arch = any
+ license = MIT
+ depends = luajit
+ source = git+https://github.com/tnychn/mpv-discord.git
+ sha256sums = SKIP
+
+pkgname = mpv-discord-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..25b6af4246ba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: selpast <selpast@pm.me>
+_pkgbase=mpv-discord
+pkgname=$_pkgbase-git
+pkgver=1.6.1.r0.g861bfe5
+pkgrel=1
+pkgdesc='A cross-platform Discord Rich Presence integration for mpv'
+url='https://github.com/tnychn/mpv-discord'
+arch=('any')
+license=(MIT)
+depends=(luajit)
+source=(git+${url}.git)
+sha256sums=(SKIP)
+pkgver() {
+ cd $_pkgbase
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $srcdir/$_pkgbase/script-opts
+ patch --forward --input="${srcdir}/../binary_path.patch"
+}
+
+package() {
+ cd $srcdir/$_pkgbase
+ mkdir -p $pkgdir/etc/mpv/scripts/
+ mkdir -p $pkgdir/etc/mpv/script-opts/
+ mkdir $pkgdir/lib/
+ install -Dm644 "scripts/discord.lua" "${pkgdir}/etc/mpv/scripts/"
+ install -Dm644 "script-opts/discord.conf" "${pkgdir}/etc/mpv/script-opts/"
+ install -Dm644 "bin/linux/mpv-discord" "${pkgdir}/lib/"
+}
diff --git a/binary_path.patch b/binary_path.patch
new file mode 100644
index 000000000000..1ecfd79df932
--- /dev/null
+++ b/binary_path.patch
@@ -0,0 +1,11 @@
+--- discord.conf 2022-03-09 14:21:59.949510578 +0400
++++ discord.conf 2022-03-09 14:27:07.542841948 +0400
+@@ -1,7 +1,7 @@
+ key=D
+ active=yes
+ client_id=737663962677510245
+-binary_path=
++binary_path=/lib/mpv-discord
+ socket_path=/tmp/mpvsocket
+ use_static_socket_path=yes
+ autohide_threshold=0