-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(go): 🐛 ensure build scripts are committed
- Loading branch information
Showing
4 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
!/*.yml | ||
!/*.json | ||
!/*.toml | ||
!build/* | ||
!build/**/* | ||
|
||
!/assets/**/* | ||
!/internal/agent/ui/assets/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
id: com.github.joshuar.go-hass-agent | ||
runtime: org.freedesktop.Platform | ||
runtime-version: '23.08' | ||
sdk: org.freedesktop.Sdk | ||
command: go-hass-agent | ||
modules: | ||
- name: go-hass-agent | ||
buildsystem: simple | ||
env: | ||
CGO_ENABLED: 1 | ||
build-commands: | ||
- go generate ./... | ||
- go build | ||
sources: | ||
- type: dir | ||
path: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2024 Joshua Rich <[email protected]> | ||
# | ||
# This software is released under the MIT License. | ||
# https://opensource.org/licenses/MIT | ||
|
||
set -e | ||
|
||
# set ccpkg and arch as appropriate | ||
case $1 in | ||
linux/amd64) ccpkg=(gcc) arch=(amd64) ;; | ||
linux/arm/*) ccpkg=(gcc gcc-arm-linux-gnueabihf) arch=(armhf) ;; | ||
arm64) ccpkg=(gcc gcc-aarch64-linux-gnu) arch=(arm64) ;; | ||
all) ccpkg=(gcc gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu) arch=(armhf arm64 amd64) ;; | ||
*) echo "No arch specified" && exit -1 ;; | ||
esac | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get -y install desktop-file-utils pkg-config git ${ccpkg[@]:0} | ||
for arch in "$@"; do | ||
apt-get -y install \ | ||
libgl1-mesa-dev:${arch} xserver-xorg-dev:${arch} \ | ||
libxcursor-dev:${arch} libxrandr-dev:${arch} \ | ||
libxinerama-dev:${arch} libxi-dev:${arch} \ | ||
libgl1-mesa-dev:${arch} libxxf86vm-dev:${arch} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2024 Joshua Rich <[email protected]> | ||
# | ||
# This software is released under the MIT License. | ||
# https://opensource.org/licenses/MIT | ||
|
||
set -e | ||
|
||
# set arch as appropriate | ||
case $1 in | ||
linux/amd64) arch=(amd64) ;; | ||
linux/arm/*) arch=(armhf) ;; | ||
arm64) arch=(arm64) ;; | ||
all) arch=(armhf arm64 amd64) ;; | ||
*) echo "No arch specified" && exit -1 ;; | ||
esac | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
for arch in "$@"; do | ||
apt-get -y install \ | ||
libgl1:${arch} libx11-6:${arch} libglx0:${arch} \ | ||
libglvnd0:${arch} libxcb1:${arch} libxau6:${arch} \ | ||
libxdmcp6:${arch} dbus-x11:${arch} | ||
done | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/* |