summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa312af2bb81338b4d8dee56574d2a904e1668f3 (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
# Maintainer: tippfehlr <tippfehlr@tippfehlr.eu>

pkgname=openbuilds-control-bin
pkgver=1.0.388
pkgrel=1
pkgdesc="Grbl Host / Interface for all CNC style machines running Grbl"
url="https://github.com/OpenBuilds/OpenBuilds-CONTROL"
license=(GPL-3.0-only)
arch=(x86_64)
provides=(openbuilds-control)
conflicts=(openbuilds-control)
_electron=electron23
depends=(
    $_electron dbus libxdamage nss at-spi2-core cairo alsa-lib libdrm gtk3
    libxcomposite expat libx11 glib2 libxfixes libcups libxrandr pango nspr
    python libxcb mesa libxext libxkbcommon hicolor-icon-theme
)
source=("$url/releases/download/v$pkgver/OpenBuildsCONTROL_${pkgver}_amd64.deb")
sha512sums=('c30b6855dee19f615fd05f6e0c68f8f006710549f2d3ed93d59d1871fadf00a5c2fdf8d72be7dca98f5369f45dbb25b2791f844d07bf93e05643f1a393ef3aa8')
prepare() {
    cd $srcdir
    tar -pxf data.tar.xz
    sed -i 's|Exec=.*|Exec=/usr/bin/openbuildscontrol %U|' usr/share/applications/openbuildscontrol.desktop
    sed -i 's/OpenBuildsCONTROL/OpenBuilds CONTROL/' usr/share/applications/openbuildscontrol.desktop
}

package() {
    cd $srcdir
    cp -ar "usr" "$pkgdir/"
    install -Dm644 "opt/OpenBuildsCONTROL/resources/app.asar" -t "$pkgdir/usr/lib/openbuilds-control/"
    install -Dm755 /dev/stdin "$pkgdir/usr/bin/openbuildscontrol" <<EOF
#!/usr/bin/sh
exec $_electron /usr/lib/openbuilds-control/app.asar "\$@"
EOF
}