blob: a59ac16f85d084231c3d755f9397b96ee433be29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=ytmdesktop
pkgver=2.0.6
pkgrel=1
_nodeversion=20
pkgdesc="A desktop app for YouTube Music"
arch=('x86_64')
url="https://ytmdesktop.app"
license=('GPL-3.0-or-later')
depends=('alsa-lib' 'gtk3' 'libnotify' 'libxtst' 'nss' 'xdg-utils')
makedepends=('git' 'nvm' 'python' 'yarn' 'zip')
optdepends=('libgnome-keyring'
'lsb-release')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ytmdesktop/ytmdesktop/archive/refs/tags/v$pkgver.tar.gz"
"$pkgname.sh"
"$pkgname.desktop")
sha256sums=('304321f9d51133e650ee0c0ffb083586ca8eb90be12951e0c1d915fa06ddc282'
'05a97a350ffe07c1dfdf064dfc223ab4b38efc89942ba196d90c64a88a5afb3e'
'cef9bd688fa6a77fe800192d38ec647c9ca3b146abb54cf08947c67f47b467d1')
_ensure_local_nvm() {
# let's be sure we are starting clean
which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
export NVM_DIR="$srcdir/.nvm"
# The init script returns 3 if version specified
# in ./.nvrc is not (yet) installed in $NVM_DIR
# but nvm itself still gets loaded ok
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
}
prepare() {
cd "$pkgname-$pkgver"
export YARN_CACHE_FOLDER="$srcdir/yarn-cache"
_ensure_local_nvm
nvm install "${_nodeversion}"
yarn --immutable
}
build() {
cd "$pkgname-$pkgver"
export YARN_CACHE_FOLDER="$srcdir/yarn-cache"
_ensure_local_nvm
yarn make --targets="@electron-forge/maker-zip"
}
package() {
cd "$pkgname-$pkgver"
install -d "$pkgdir/opt/$pkgname"
cp -r out/YouTube\ Music\ Desktop\ App-linux-x64/. "$pkgdir/opt/$pkgname"
chmod 4755 "$pkgdir/opt/$pkgname/chrome-sandbox"
install -Dm644 src/assets/icons/ytmd.png \
"$pkgdir/usr/share/pixmaps/$pkgname.png"
install -Dm644 "$srcdir/$pkgname.desktop" -t \
"$pkgdir/usr/share/applications/"
install -d "$pkgdir/usr/bin"
ln -s "/opt/$pkgname/youtube-music-desktop-app" "$pkgdir/usr/bin/"
}
|