feat(docker): add Dockerfile for Arch Linux package build and CI workflow for automated packaging

This commit is contained in:
2026-01-03 21:36:33 -06:00
parent c1d177a887
commit 151b69ad50
5 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
name: Arch Linux Package
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Build Arch Package
run: |
docker build -t arch-builder -f Dockerfile.arch-builder .
docker run --rm -v $(pwd):/home/build/project arch-builder
- name: Upload Artifact
uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
with:
name: arch-package
path: packaging/arch/*.pkg.tar.zst

39
Dockerfile.arch-builder Normal file
View File

@@ -0,0 +1,39 @@
FROM archlinux:latest
# Install build dependencies
RUN pacman -Syu --noconfirm --needed \
base-devel \
git \
sudo \
nodejs \
pnpm \
python \
python-poetry \
opus \
opusfile \
portaudio \
espeak-ng \
nss \
atk \
at-spi2-core \
libxcomposite \
libxrandr \
libxdamage \
mesa \
alsa-lib \
libx11
# Create a non-root user for makepkg
RUN useradd -m build && \
echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/build
# Set up build directory
USER build
WORKDIR /home/build/project
# Copy packaging files
COPY --chown=build:build packaging/arch /home/build/project/packaging/arch
# Default command to build the package
CMD ["/bin/bash", "-c", "cd packaging/arch && makepkg -s --noconfirm"]

34
packaging/arch/.SRCINFO Normal file
View File

@@ -0,0 +1,34 @@
pkgbase = reticulum-meshchatx-git
pkgdesc = A simple mesh network communications app powered by the Reticulum Network Stack
pkgver = 4.0.0.r627.g4976722
pkgrel = 1
url = https://git.quad4.io/RNS-Things/MeshChatX
arch = x86_64
arch = aarch64
license = MIT
makedepends = git
makedepends = nodejs
makedepends = pnpm
makedepends = python
makedepends = python-poetry
depends = opus
depends = opusfile
depends = portaudio
depends = espeak-ng
depends = nss
depends = atk
depends = at-spi2-core
depends = libxcomposite
depends = libxrandr
depends = libxdamage
depends = mesa
depends = alsa-lib
depends = libx11
provides = reticulum-meshchatx
conflicts = reticulum-meshchatx
source = reticulum-meshchatx::git+https://git.quad4.io/RNS-Things/MeshChatX.git
source = reticulum-meshchatx.desktop
sha256sums = SKIP
sha256sums = 366182e198df672bb51893f7cf7f339079bf80319c24c107216c1b96d33fd267
pkgname = reticulum-meshchatx-git

57
packaging/arch/PKGBUILD Normal file
View File

@@ -0,0 +1,57 @@
# Maintainer: Ivan <ivan@quad4.io>
pkgname=reticulum-meshchatx-git
_pkgname=reticulum-meshchatx
pkgver=3.3.2.r90.g978d917
pkgrel=1
pkgdesc="A simple mesh network communications app powered by the Reticulum Network Stack"
arch=('x86_64' 'aarch64')
url="https://git.quad4.io/RNS-Things/MeshChatX"
license=('MIT')
depends=('opus' 'opusfile' 'portaudio' 'espeak-ng' 'nss' 'atk' 'at-spi2-core' 'libxcomposite' 'libxrandr' 'libxdamage' 'mesa' 'alsa-lib' 'libx11')
makedepends=('git' 'nodejs' 'pnpm' 'python' 'python-poetry')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+https://git.quad4.io/RNS-Things/MeshChatX.git"
"reticulum-meshchatx.desktop")
sha256sums=('SKIP'
'366182e198df672bb51893f7cf7f339079bf80319c24c107216c1b96d33fd267')
pkgver() {
cd "$_pkgname"
git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || \
printf "4.0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$_pkgname"
export PNPM_HOME="$srcdir/.pnpm-home"
export POETRY_CACHE_DIR="$srcdir/.poetry-cache"
export POETRY_VIRTUALENVS_IN_PROJECT=true
pnpm install
poetry install
}
build() {
cd "$_pkgname"
export PNPM_HOME="$srcdir/.pnpm-home"
export POETRY_CACHE_DIR="$srcdir/.poetry-cache"
export POETRY_VIRTUALENVS_IN_PROJECT=true
pnpm run build
pnpm exec electron-builder --linux --dir
}
package() {
cd "$_pkgname"
install -d "$pkgdir/usr/lib/$_pkgname"
cp -a dist/linux-unpacked/* "$pkgdir/usr/lib/$_pkgname/"
install -d "$pkgdir/usr/bin"
ln -s "/usr/lib/$_pkgname/reticulum-meshchatx" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 "$srcdir/reticulum-meshchatx.desktop" "$pkgdir/usr/share/applications/reticulum-meshchatx.desktop"
install -Dm644 logo/logo.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/reticulum-meshchatx.png"
}

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Name=Reticulum MeshChatX
Comment=A simple mesh network communications app powered by the Reticulum Network Stack
Exec=reticulum-meshchatx
Icon=reticulum-meshchatx
Terminal=false
Type=Application
Categories=Network;