diff options
author | Mark Wagie | 2023-02-24 10:15:27 -0700 |
---|---|---|
committer | Mark Wagie | 2023-02-24 10:15:27 -0700 |
commit | 8498860c0b7e7149f7e3e68be082ea482238d9fa (patch) | |
tree | 557e927e02b48ab7ce73163750aa161345e4b315 | |
parent | a7b26b2e6abe0b3c19a63e58c725f6d5c09815b4 (diff) | |
download | aur-8498860c0b7e7149f7e3e68be082ea482238d9fa.tar.gz |
add support for Electron flags
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | youtube-music.install | 22 | ||||
-rw-r--r-- | youtube-music.sh | 11 |
5 files changed, 46 insertions, 6 deletions
@@ -1,8 +1,9 @@ pkgbase = youtube-music-bin pkgdesc = YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader) pkgver = 1.19.0 - pkgrel = 1 + pkgrel = 2 url = https://th-ch.github.io/youtube-music + install = youtube-music.install arch = x86_64 license = MIT depends = gtk3 @@ -14,7 +15,9 @@ pkgbase = youtube-music-bin conflicts = youtube-music source = https://github.com/th-ch/youtube-music/releases/download/v1.19.0/youtube-music_1.19.0_amd64.deb source = https://github.com/th-ch/youtube-music/raw/v1.19.0/license + source = youtube-music.sh sha256sums = f8bebf16cd24463dd830bdf3dbd59cc6a4f44a5422a2b995f1ef8bb260325beb sha256sums = e7e14b3b771ecadb23f6ee0b6f99d1553e385e35cdb44fc8e36ee7c878dacd08 + sha256sums = 00a19851f1b91c7fbefede55f6a17a51182d8bb41187569684f9f58566a83b26 pkgname = youtube-music-bin diff --git a/.gitignore b/.gitignore index 4dab8d6386e3..81c97a0d6738 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ !.gitignore !PKGBUILD !.SRCINFO +!youtube-music.install +!youtube-music.sh @@ -2,7 +2,7 @@ # Contributor: Harsh Barsaiyan <hbarsaiyan at gmail dot com> pkgname=youtube-music-bin pkgver=1.19.0 -pkgrel=1 +pkgrel=2 pkgdesc="YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)" arch=('x86_64') url="https://th-ch.github.io/youtube-music" @@ -12,16 +12,18 @@ optdepends=('libnotify: desktop notifications' 'libappindicator-gtk3: tray icon') provides=("${pkgname%-bin}") conflicts=("${pkgname%-bin}") +install="${pkgname%-bin}.install" source=("https://github.com/th-ch/youtube-music/releases/download/v$pkgver/${pkgname%-bin}_${pkgver}_amd64.deb" - "https://github.com/th-ch/youtube-music/raw/v$pkgver/license") + "https://github.com/th-ch/youtube-music/raw/v$pkgver/license" + "${pkgname%-bin}.sh") sha256sums=('f8bebf16cd24463dd830bdf3dbd59cc6a4f44a5422a2b995f1ef8bb260325beb' - 'e7e14b3b771ecadb23f6ee0b6f99d1553e385e35cdb44fc8e36ee7c878dacd08') + 'e7e14b3b771ecadb23f6ee0b6f99d1553e385e35cdb44fc8e36ee7c878dacd08' + '00a19851f1b91c7fbefede55f6a17a51182d8bb41187569684f9f58566a83b26') package(){ bsdtar xfv data.tar.xz -C "$pkgdir" - install -d "$pkgdir/usr/bin" - ln -s "/opt/YouTube Music/${pkgname%-bin}" "$pkgdir/usr/bin/${pkgname%-bin}" + install -Dm755 "${pkgname%-bin}.sh" "$pkgdir/usr/bin/${pkgname%-bin}" install -Dm644 license -t "$pkgdir/usr/share/licenses/${pkgname%-bin}" } 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 new file mode 100644 index 000000000000..6c7d63d03de8 --- /dev/null +++ b/youtube-music.sh @@ -0,0 +1,11 @@ +#!/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 +exec /opt/YouTube\ Music/youtube-music $YOUTUBE_MUSIC_USER_FLAGS "$@" |