blob: f1fcc154c48d5e07783a4eb19dfc7f5bf7017947 (
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
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=youtube-music-git
pkgver=3.6.2.r2.g5c9d3e3
pkgrel=1
_electronversion=33
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"
license=('MIT')
depends=("electron${_electronversion}" 'libsecret')
makedepends=('git' 'pnpm')
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'
'e00aee0592b3b759fc055815c75326063348bcdf6e05b7632396592b05614637'
'07af59376e13e5dae2e7e38fa09d734a5147d5c344b3aed84c2f3afe22b8af79')
pkgver() {
cd "${pkgname%-git}"
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${pkgname%-git}"
sed -i "s|@ELECTRONVERSION@|${_electronversion}|" "$srcdir/${pkgname%-git}.sh"
}
build() {
cd "${pkgname%-git}"
electronDist="/usr/lib/electron${_electronversion}"
electronVer="$(sed s/^v// /usr/lib/electron${_electronversion}/version)"
export PNPM_HOME="$srcdir/pnpm-home"
pnpm install
pnpm clean
pnpm build
pnpm electron-builder --linux dir \
${dist} -c.electronDist=${electronDist} -c.electronVersion=${electronVer}
}
package() {
cd "${pkgname%-git}"
install -Dm644 pack/linux-unpacked/resources/app.asar -t "$pkgdir/usr/lib/${pkgname%-git}/"
cp -r pack/linux-unpacked/resources/app.asar.unpacked "$pkgdir/usr/lib/${pkgname%-git}"
install -Dm755 "$srcdir/${pkgname%-git}.sh" "$pkgdir/usr/bin/${pkgname%-git}"
install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications/"
install -Dm644 license -t "$pkgdir/usr/share/licenses/${pkgname%-git}/"
for i in 16 24 32 48 64 128 256 512 1024; do
install -Dm644 "assets/generated/icons/png/${i}x${i}.png" \
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname%-git}.png"
done
}
|