blob: 83c1d039d278fa525630e9cc5f9850fbffdb327e (
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
|
# Maintainer: tippfehlr <tippfehlr@tippfehlr.eu>
pkgname=openbuilds-control
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)
_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
)
makedepends=(npm git python-setuptools)
source=(
"git+${url}#tag=v$pkgver"
'openbuildscontrol.desktop'
)
sha512sums=('157872b36462046ab93f9dc3becdc1500d67770dce6d54508397bb4a89b62041613a634a14bffddc8a6f325fffb20ff6fcbd5ed117b08fc9c2ce76c01171ebbf'
'896cc097f594268618ddaa9cec137e8bbd4314ad7796e077f73f88aa034f32903d9056ea0c5299b5a91f26f53ae3cc4917482e3280854144e388568d86232879')
build() {
cd OpenBuilds-CONTROL
export npm_config_target=$(tail /usr/lib/$_electron/version)
export npm_config_arch=x64
export npm_config_target_arch=x64
export npm_config_disturl=https://electronjs.org/headers
export npm_config_runtime=electron
export npm_config_build_from_source=true
HOME="$srcdir/.electron-gyp" npm install
./node_modules/.bin/electron-builder --linux --x64 --dir -c.electronDist=/usr/lib/$_electron/ -c.electronVersion=$(cat /usr/lib/$_electron/version)
}
package() {
cd OpenBuilds-CONTROL/
install -Dm644 dist/linux-unpacked/resources/app.asar -t "$pkgdir/usr/lib/openbuilds-control/"
cp -r --preserve=mode dist/linux-unpacked/resources/app.asar.unpacked/ "$pkgdir/usr/lib/openbuilds-control/"
install -Dm644 app/icon.png "$pkgdir/usr/share/icons/hicolor/32x32/apps/openbuildscontrol.png"
install -Dm644 ../openbuildscontrol.desktop -t "$pkgdir/usr/share/applications/"
install -Dm755 /dev/stdin "$pkgdir/usr/bin/openbuildscontrol" <<EOF
#!/usr/bin/sh
exec $_electron /usr/lib/openbuilds-control/app.asar "\$@"
EOF
}
|