blob: 1f39680c7d49a07fc1c216863c32d0c5fe89755b (
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
|
# Maintainer: 4s3ti <4s3ti@4s3ti.net>
_pkgver=1.5.3-rc.1
_appimage="Bazecor-${_pkgver}-x64.AppImage"
pkgname="bazecor"
pkgver=${_pkgver/-/.}
pkgrel=1
pkgdesc="Graphical configurator for Dygma keyboards"
url="https://github.com/Dygmalab/Bazecor"
license=("GPL-3.0-only")
provides=("${pkgname}")
conflicts=("${pkgname}-git")
arch=("x86_64")
depends=('zlib' 'fuse2')
options=(!strip)
noextract=("${_appimage}")
# https://github.com/Dygmalab/Bazecor/releases/download/v1.4.0-rc4/Bazecor-1.4.0-rc.4-x64.AppImage
source=("${url}/releases/download/v${_pkgver}/${_appimage}"
"10-dygma.rules")
sha256sums=('f84dd3bbe0c952d18e2f5baadbb4deba11da6e04b9d7581406ef0dd9ee9eedaf'
'7cc39c4fdc1736c267d22d9fbaacc9db4afd026c3a77b1d263c3a11b65581def')
prepare() {
chmod +x "${_appimage}"
"./${_appimage}" --appimage-extract
}
build() {
# Adjust .desktop so it will work outside of AppImage container
sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${pkgname/b/B}|"\
"squashfs-root/${pkgname/b/B}.desktop"
# Fix permissions; .AppImage permissions are 700 for all directories
chmod -R a-x+rX squashfs-root/usr
# Do not use Capital B for exec
sed -i "s/Exec=Bazecor/Exec=bazecor/" "squashfs-root/${pkgname/b/B}.desktop"
}
package() {
install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${_appimage}"
# Desktop file
install -Dm644 "${srcdir}/squashfs-root/${pkgname/b/B}.desktop"\
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
# Icon images
install -dm755 "${pkgdir}/usr/share/"
cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"
# Symlink executable
install -dm755 "${pkgdir}/usr/bin"
ln -s "/opt/${pkgname}/${_appimage}" "${pkgdir}/usr/bin/${pkgname}"
# Udev Rules
# https://github.com/Dygmalab/Bazecor/blob/development/src/main/utils/udev.ts#L6C1-L6C284
install -Dm644 "${srcdir}/10-dygma.rules" "${pkgdir}/etc/udev/rules.d/10-dygma.rules"
}
|