apt update && \
apt install -y \
pkg-config \
build-essential \
gcc \
libgl1-mesa-dev \
libx11-dev \
libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libxinerama-dev \
libxi-dev \
libxrandr-dev \
libxinerama-dev \
libx11-dev \
libxxf86vm-dev \
wget
wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz && \
export PATH=$PATH:/usr/local/go/bin
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -o linux_arm64 -buildvcs=false
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o linux_amd64 -buildvcs=false
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o darwin_arm64
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o darwin_amd64
# Don't care
mkdir -p build/{darwin,linux} && \
mkdir -p build/darwin/{arm64,x86_64} && \
mkdir -p build/linux/{arm64,x86_64} && \
mkdir build/tar
Build
for dir in build/{linux,darwin}/{arm64,x86_64}; do
cp README.md "$dir"/
done
for dir in build/{linux,darwin}/{arm64,x86_64}
do tar -czvf "build/tar/khaossweeper_$(basename $(dirname $dir))_$(basename $dir).tar.gz" -C "$(dirname $dir)" "$(basename $dir)"
done
shasum -s 256 build/tar/* > build/tar/khaossweeper_${VERSION}_checksums.txt