blob: beddd1471f91e8a99506e1e4afb7eb7bbb7babb4 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
# Contributor: xiota
# Contributor: Dušan Simić <dusan.simic1810@gmail.com>
pkgname=revolt-desktop-bin
_pkgname=Revolt
pkgver=1.0.8
_electronversion=33
pkgrel=1
pkgdesc="User-first chat platform built with modern web technologies.(Prebuilt version.Use system-wide electron)"
url="https://github.com/revoltchat/desktop"
license=('AGPL-3.0-only')
arch=(
'aarch64'
'armv7h'
'x86_64'
)
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}=${pkgver}")
depends=(
"electron${_electronversion}"
'python'
)
source=("${pkgname%-bin}.sh")
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-arm64.AppImage")
source_armv7h=("${pkgname%-bin}-${pkgver}-armv7h.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-armv7l.AppImage")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage")
sha256sums=('291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
sha256sums_aarch64=('5505f25da2f831ade978ed5db8097217091bd42450ff80cd6618e2027866b3a2')
sha256sums_armv7h=('430c9ae6d8078cc07c2098b4b9e1a6933810310bbeae5b03a16215a65e958f6c')
sha256sums_x86_64=('2f6dc97b9a7b56642938b0be21f990464d8228a526e2b34176c60bbea2d39516')
build() {
sed -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_pkgname}/g
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
" -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g;s/InstantMessaging/InstantMessaging;Network/g" "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} +
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/512x512/apps/${pkgname%-bin}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
|