blob: ef8a42f5646f0b5201122d817a52d467ab87d35b (
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
|
# Maintainer: Michael Hughes <mhughes+aur at mhughes dot dev>
# Contributor: Saurabh Kumar Sharma <saurabh000345 at gmail dot com>
pkgname="soundcloud-nativefier"
pkgver=20230310
pkgrel=1
pkgdesc="SoundCloud desktop app built with nativefier (electron)"
arch=("x86_64")
url="https://soundcloud.com"
license=("MIT")
_electron=22
depends=("electron${_electron}")
makedepends=(
"curl"
"gendesk"
"yarn"
)
_name="SoundCloud"
prepare() {
cat > "${pkgname}" <<EOF
#!/usr/bin/env bash
exec electron${_electron} /usr/share/${pkgname} "\$@"
EOF
gendesk \
--pkgname "${pkgname}" \
--pkgdesc "${pkgdesc}" \
--name "${_name}" \
--categories "Audio;AudioVideo;Player;" \
-n \
-f
curl \
"https://d21buns5ku92am.cloudfront.net/26628/images/419677-sc-logo-vertical-black%20%281%29-81a8fc-original-1645807040.png" \
> "${pkgname}.png"
}
build() {
cd "${srcdir}"
yarn add nativefier
yarn nativefier \
https://soundcloud.com \
--name "${_name}" \
--icon "${pkgname}.png" \
--maximize \
--user-agent safari \
--single-instance \
--verbose
}
package() {
mkdir -p "${pkgdir}/usr/share"
local _x=`echo "${_name}-linux-"*`
cp -r "${_x}/resources/app" "${pkgdir}/usr/share/${pkgname}"
install -Dm755 -t "${pkgdir}/usr/bin/" "${pkgname}"
install -Dm644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${_x}/LICENSE"
install -Dm644 -t "${pkgdir}/usr/share/pixmaps/" "${pkgname}.png"
}
|