diff options
author | Mark Wagie | 2023-02-24 10:23:12 -0700 |
---|---|---|
committer | Mark Wagie | 2023-02-24 10:23:12 -0700 |
commit | aa23454002b17411700f5348acf781488021e60a (patch) | |
tree | 91b7a37dceecce73320f0f8435e48f1ef351e964 | |
parent | 3ec03803a6c9a4ec73c21d311519b5641ef80329 (diff) | |
download | aur-aa23454002b17411700f5348acf781488021e60a.tar.gz |
add support for Electron flags
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | youtube-music.install | 22 | ||||
-rw-r--r-- | youtube-music.sh | 10 |
5 files changed, 38 insertions, 5 deletions
@@ -1,8 +1,9 @@ pkgbase = youtube-music-git pkgdesc = YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader) - pkgver = 1.19.0.r74.g7bdbab5 + pkgver = 1.19.0.r99.g8bfbbca pkgrel = 1 url = https://th-ch.github.io/youtube-music + install = youtube-music.install arch = x86_64 license = MIT makedepends = git @@ -18,7 +19,7 @@ pkgbase = youtube-music-git source = youtube-music.sh source = youtube-music.desktop sha256sums = SKIP - sha256sums = 66acb7f000ec69c5b22b3bb7f49f020820595ae8ccaa688d28de35924c1c241f + sha256sums = bb948add1316b4b5e42dc0d72e4866fff3fe42ae013969489ab19121d4e98e48 sha256sums = 07af59376e13e5dae2e7e38fa09d734a5147d5c344b3aed84c2f3afe22b8af79 pkgname = youtube-music-git diff --git a/.gitignore b/.gitignore index af61e50a1e7f..7b6a7554a9ab 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ !.gitignore !PKGBUILD !.SRCINFO +!youtube-music.install !youtube-music.sh !youtube-music.desktop @@ -1,6 +1,6 @@ # Maintainer: Mark Wagie <mark dot wagie at tutanota dot com> pkgname=youtube-music-git -pkgver=1.19.0.r74.g7bdbab5 +pkgver=1.19.0.r99.g8bfbbca pkgrel=1 _electronversion=22 pkgdesc="YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)" @@ -12,11 +12,12 @@ makedepends=('git' 'nodejs>=16.0.0' 'npm' 'yarn') optdepends=('libnotify: desktop notifications') provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") +install="${pkgname%-git}.install" source=('git+https://github.com/th-ch/youtube-music.git' "${pkgname%-git}.sh" "${pkgname%-git}.desktop") sha256sums=('SKIP' - '66acb7f000ec69c5b22b3bb7f49f020820595ae8ccaa688d28de35924c1c241f' + 'bb948add1316b4b5e42dc0d72e4866fff3fe42ae013969489ab19121d4e98e48' '07af59376e13e5dae2e7e38fa09d734a5147d5c344b3aed84c2f3afe22b8af79') pkgver() { diff --git a/youtube-music.install b/youtube-music.install new file mode 100644 index 000000000000..b16592f0aab1 --- /dev/null +++ b/youtube-music.install @@ -0,0 +1,22 @@ +# Colored makepkg-like functions +msg_blue() { + printf "${blue}==>${bold} $1${all_off}\n" +} + +note() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + +post_install() { + note "Custom flags should be put directly in: ~/.config/youtube-music-flags.conf" +} + +post_upgrade() { + post_install +} + diff --git a/youtube-music.sh b/youtube-music.sh index 905c1c992782..be4d12774ffb 100644 --- a/youtube-music.sh +++ b/youtube-music.sh @@ -1,4 +1,12 @@ #!/bin/bash +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config} + +# Allow users to override command-line options +if [[ -f $XDG_CONFIG_HOME/chrome-flags.conf ]]; then + YOUTUBE_MUSIC_USER_FLAGS="$(cat $XDG_CONFIG_HOME/youtube-music-flags.conf)" +fi + +# Launch export ELECTRON_IS_DEV=0 -exec electron22 /usr/lib/youtube-music/app.asar "$@" +exec electron22 /usr/lib/youtube-music/app.asar $YOUTUBE_MUSIC_USER_FLAGS "$@" |