blob: 5916f22b0969d828e505a4ecb1a83abe3fcb9fb3 (
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
|
_name=webcord
pkgname=${_name}-bin
pkgver=4.10.5
pkgrel=1
pkgdesc='A Discord client implemented directly without Discord API (binary release)'
arch=('x86_64' 'aarch64' 'armv7h')
url="https://github.com/SpacingBat3/WebCord"
license=('MIT')
provides=("${_name}")
conflicts=("${_name}")
options=('!strip' '!emptydirs')
depends=(
'bash'
'glibc'
)
_get_source() {
echo -n "${url}/releases/download/v${pkgver}/${_name}-${pkgver}-1.${1}.rpm"
}
source=('flags.sh')
source_x86_64=("$(_get_source x86_64)")
source_aarch64=("$(_get_source arm64)")
source_armv7h=("$(_get_source armv7hl)")
sha256sums=('d83693ffd8034c21030262ac00ce529c8da7b0196ea4b4eb2168861fc2657a2a')
sha256sums_x86_64=('a2aa03c508a830d8164e5fcb47ef69875930d4de609d2103fb0944ddf7c58aad')
sha256sums_aarch64=('68dfee98275f27f33a22a42ba212b8e2a1f456f4d262e3ade6619c51b99b9506')
sha256sums_armv7h=('21d2501bb77c7a331f5665d97e9d5b62b04a0b613530ebc95998021cca51a732')
noextract=(
"${source_x86_64[0]##*/}"
"${source_aarch64[0]##*/}"
"${source_armv7h[0]##*/}"
)
package() {
local sname="source_${CARCH}"
bsdtar -xf "${!sname[0]##*/}" \
-C "${pkgdir}" \
--exclude="usr/lib/.build-id" \
--exclude="usr/bin" \
--exclude="usr/share/doc"
mv "${pkgdir}/usr/lib" "${pkgdir}/opt"
sed -e "s|@NAME@|${_name}|;s|@EXEC@|/opt/${_name}/${_name}|" "${source[0]}" |
install -Dm755 '/dev/stdin' "${pkgdir}/usr/bin/${_name}"
}
|