summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorj.r2021-01-22 12:46:18 +0100
committerj.r2021-01-22 12:46:18 +0100
commit31d03b1ab525d6275e092d5278a5ebaf271864d2 (patch)
tree126e2c398ac323a7111ffe8c71aaedeb48002da6
downloadaur-31d03b1ab525d6275e092d5278a5ebaf271864d2.tar.gz
Add youplay
-rw-r--r--.SRCINFO20
-rw-r--r--0001-Change-paths-for-packaging.patch41
-rw-r--r--0002-Rename-Internet-catergorie-because-it-does-not-exist.patch24
-rw-r--r--PKGBUILD36
4 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f11da9f2ca1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = youplay
+ pkgdesc = Search, download and play music from YouTube.
+ pkgver = 0.28
+ pkgrel = 1
+ url = https://codeberg.org/ralfhersel/youplay
+ arch = any
+ license = GPL3
+ depends = mpv
+ depends = ffmpeg
+ depends = python-mpv
+ depends = youtube-dl
+ source = youplay-0.28.tar.gz::https://codeberg.org/ralfhersel/youplay/archive/v0.28.tar.gz
+ source = 0001-Change-paths-for-packaging.patch
+ source = 0002-Rename-Internet-catergorie-because-it-does-not-exist.patch
+ md5sums = 87c6cdab99219a6eaffa2be122ef518d
+ md5sums = 45141b5634cde06c6805fc9b9a589e64
+ md5sums = bacb881be40e69da218f01cf1d9df541
+
+pkgname = youplay
+
diff --git a/0001-Change-paths-for-packaging.patch b/0001-Change-paths-for-packaging.patch
new file mode 100644
index 00000000000..5d2da80d5a5
--- /dev/null
+++ b/0001-Change-paths-for-packaging.patch
@@ -0,0 +1,41 @@
+From 91b59352e76e7367319f138fac863da79c0d8712 Mon Sep 17 00:00:00 2001
+From: "j.r" <j.r@jugendhacker.de>
+Date: Thu, 14 Jan 2021 23:57:02 +0100
+Subject: [PATCH 1/2] Change paths for packaging
+
+---
+ youplay.desktop | 4 ++--
+ youplay.sh | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/youplay.desktop b/youplay.desktop
+index 2b66ce6..1e85b1e 100755
+--- a/youplay.desktop
++++ b/youplay.desktop
+@@ -2,11 +2,11 @@
+ Name=YouPlay
+ GenericName=Play music from Youtube
+ Comment=Play and download music from Youtube
+-Exec=/home/ralf/dev/youplay/youplay.sh
++Exec=/usr/bin/youplay --gui
+ Terminal=false
+ Type=Application
+ StartupNotify=false
+-Icon=/home/ralf/dev/youplay/youplay.svg
++Icon=/usr/share/youplay/youplay.svg
+ Categories=GNOME;GTK;Utility;Internet;Music
+ Keywords=Multimedia;Music;Internet;Youtube
+ Hidden=false
+diff --git a/youplay.sh b/youplay.sh
+index 6d2fb87..571f78b 100755
+--- a/youplay.sh
++++ b/youplay.sh
+@@ -1,3 +1,3 @@
+ #!/bin/bash
+-cd `dirname $0`
+-python3 youplay.py --gui
++cd '/usr/share/youplay/'
++python3 youplay.py $*
+--
+2.30.0
+
diff --git a/0002-Rename-Internet-catergorie-because-it-does-not-exist.patch b/0002-Rename-Internet-catergorie-because-it-does-not-exist.patch
new file mode 100644
index 00000000000..d83bd68b49d
--- /dev/null
+++ b/0002-Rename-Internet-catergorie-because-it-does-not-exist.patch
@@ -0,0 +1,24 @@
+From 062ae7131d35238dddea22c1b94acdc2846f2364 Mon Sep 17 00:00:00 2001
+From: "j.r" <j.r@jugendhacker.de>
+Date: Fri, 15 Jan 2021 01:04:53 +0100
+Subject: [PATCH 2/2] Rename Internet catergorie, because it does not exist
+
+---
+ youplay.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/youplay.desktop b/youplay.desktop
+index 1e85b1e..20adba5 100755
+--- a/youplay.desktop
++++ b/youplay.desktop
+@@ -7,6 +7,6 @@ Terminal=false
+ Type=Application
+ StartupNotify=false
+ Icon=/usr/share/youplay/youplay.svg
+-Categories=GNOME;GTK;Utility;Internet;Music
++Categories=GNOME;GTK;Utility;X-Internet;Music
+ Keywords=Multimedia;Music;Internet;Youtube
+ Hidden=false
+--
+2.30.0
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..46707775f04
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Your Name <youremail@domain.com>
+pkgname=youplay
+pkgver=0.28
+pkgrel=1
+pkgdesc="Search, download and play music from YouTube."
+arch=(any)
+url="https://codeberg.org/ralfhersel/youplay"
+license=('GPL3')
+depends=(mpv ffmpeg python-mpv youtube-dl)
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
+ "0001-Change-paths-for-packaging.patch"
+ "0002-Rename-Internet-catergorie-because-it-does-not-exist.patch")
+md5sums=('87c6cdab99219a6eaffa2be122ef518d'
+ '45141b5634cde06c6805fc9b9a589e64'
+ 'bacb881be40e69da218f01cf1d9df541')
+
+prepare() {
+ cd "${pkgname}"
+
+ patch -p1 -i ${srcdir}/0001-Change-paths-for-packaging.patch
+ patch -p1 -i ${srcdir}/0002-Rename-Internet-catergorie-because-it-does-not-exist.patch
+}
+
+package() {
+ cd "${pkgname}"
+
+ install -Dm755 youplay.sh ${pkgdir}/usr/bin/${pkgname}
+ install -Dm755 youplay.py ${pkgdir}/usr/share/${pkgname}/${pkgname}.py
+ install -Dm644 youplay.svg ${pkgdir}/usr/share/${pkgname}/${pkgname}.svg
+ desktop-file-install --dir=${pkgdir}/usr/share/applications youplay.desktop
+}