blob: 12cac50d17f16abc56b1ee1a2065db8bf1bc2b6d (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# Maintainer: Nathan Chere <git@nathanchere.com.au>
pkgname=grayjay-git
pkgver=5.r72.g4bb4e6d.r78.g08d8f13
pkgrel=1
pkgdesc="Grayjay Desktop - follow creators, not platforms (privacy- and freedom-respecting client for YouTube, Rumble, Twitch, Spotify etc)"
arch=('x86_64')
provides=('grayjay')
conflicts=('grayjay-bin')
options=('!strip' 'staticlibs')
# Even though GitLab is the official Futo repo and Github is just a mirror, for some reason they are a lot
# lazier with tagging their Gitlab releases. Use Gitlab where possible, but to keep up with latest release it will
# sometimes be neccessary to reference the Github mirror instead.
_futo_gitlab_base="gitlab.futo.org/videostreaming"
_futo_github_base="github.com/futo-org"
_github_git_url="https://${_futo_github_base}/Grayjay.Desktop.git"
_gitlab_git_url="https://${_futo_gitlab_base}/Grayjay.Desktop.git"
url="${_github_git_url}"
license=('custom:Source-First-License-1.1')
depends=('ffmpeg' 'libsodium')
makedepends=('dotnet-sdk>=8' 'git' 'git-lfs' 'npm')
source=("${pkgname}::git+${url}"
"grayjay.desktop"
"grayjay.sh"
"Grayjay.Desktop.CEF.csproj.user"
"FUTO.MDNS.csproj.user")
sha256sums=('SKIP'
'3d37aacfe2c23495448da3d7202abfa2e28db5a10cb69453f9b00b1e80a70f5d'
'3a1f43abacc62ad257edbb6c7744c132f5a50d64d0725aa79e251ddc19b6e489'
'bc13ae396e2fcd2849e4564db67fad6e1461cedebb2abdafece81fc4c00f38dd'
'be103a98e070fd289a2e5bbd1ad1e8e45fd6d9e3c9c01e791c93cc89fe1a8936')
pkgver() {
cd "$srcdir/${pkgname}"
printf "${pkgver}.r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgname}"
# When cloning from GitHub, we need to explicitly set submodule URLs to GitLab
if [[ "${url}" == *"github"* ]]; then
git config submodule.FUTO.MDNS.url "https://${_futo_gitlab_base}/FUTO.MDNS.git"
git config submodule.Grayjay.Engine.url "https://${_futo_gitlab_base}/Grayjay.Engine.git"
git config submodule.JustCef.url "https://${_futo_gitlab_base}/JustCef.git"
fi
git lfs install
git lfs fetch --all
git lfs pull
git submodule update --init --recursive
git submodule foreach 'git lfs fetch --all && git lfs pull'
cp "${srcdir}/Grayjay.Desktop.CEF.csproj.user" Grayjay.Desktop.CEF
cp "${srcdir}/FUTO.MDNS.csproj.user" FUTO.MDNS/FUTO.MDNS
}
_configuration="Release"
_target="linux-x64"
build() {
cd "${srcdir}/${pkgname}"
# Build front-end
cd Grayjay.Desktop.Web
npm install
npm run build
cd ..
# Publish CEF
local _targetdir="Grayjay.Desktop.CEF/bin/${_configuration}/net8.0/${_target}"
rm -R "${_targetdir}" 2> /dev/null || true
mkdir -p "${_targetdir}/publish/wwwroot"
cp -a "Grayjay.Desktop.Web/dist" "${_targetdir}/publish/wwwroot/web"
cd Grayjay.Desktop.CEF
dotnet publish -r "${_target}" -c "${_configuration}"
cd ..
}
package() {
# Create necessary directories
install -dm755 "${pkgdir}/opt/grayjay"
install -dm755 "${pkgdir}/usr/bin"
install -dm755 "${pkgdir}/usr/share/applications"
install -dm755 "${pkgdir}/usr/share/icons/hicolor/512x512/apps"
install -dm755 "${pkgdir}/usr/share/licenses/grayjay"
# Copy application files
local _appdir="${pkgdir}/opt/grayjay"
cp -va "${srcdir}/${pkgname}/Grayjay.Desktop.CEF/bin/${_configuration}/net8.0/${_target}/publish/." "${_appdir}"
rm -v "${_appdir}/ffmpeg"
rm -v "${_appdir}/Portable"
rm -v "${_appdir}/libsodium.so"
find "${_appdir}" -type f -name '*.so' -o -name '*.so.*' -o -name 'dotcefnative' -exec chmod a+x "{}" \;
install -Dm755 "${srcdir}/grayjay.sh" "${pkgdir}/usr/bin/grayjay"
install -Dm644 "${srcdir}/grayjay.desktop" "${pkgdir}/usr/share/applications/grayjay.desktop"
install -Dm644 "${srcdir}/${pkgname}/Grayjay.Desktop.CEF/grayjay.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/grayjay.png"
install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/grayjay/LICENSE"
}
|