Added a Manjaro/Arch-style PKGBUILD for a VCS package (zoitechat-git) under packaging/manjaro/PKGBUILD, including package metadata, runtime/build deps, pkgver() generation from git history, and build()/package() functions using Meson (arch-meson, meson compile, meson install).

Added a new GitHub Actions workflow .github/workflows/manjaro-package-build.yml that:

runs in a manjarolinux/base container,

installs Manjaro packaging/build tooling,

builds via makepkg as a non-root user,

generates .SRCINFO,

runs namcap checks on both PKGBUILD and the built package,

uploads package artifacts plus PKGBUILD/.SRCINFO.
This commit is contained in:
2026-02-23 09:35:36 -07:00
parent 0081d5c492
commit b731d3fb18
2 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
name: Manjaro Package Build
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
permissions:
contents: read
jobs:
manjaro-package:
runs-on: ubuntu-latest
container:
image: manjarolinux/base:latest
steps:
- name: Install packaging toolchain
run: |
set -euxo pipefail
pacman -Syu --noconfirm
pacman -S --noconfirm --needed \
base-devel \
git \
namcap \
meson \
ninja \
pkgconf \
glib2 \
gtk3 \
openssl \
dbus-glib \
libcanberra \
libayatana-appindicator \
iso-codes \
lua \
perl \
python \
python-cffi \
pciutils
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Build package and generate .SRCINFO (non-root)
run: |
set -euxo pipefail
useradd -m builder
chown -R builder:builder "$GITHUB_WORKSPACE"
su builder -c "cd '$GITHUB_WORKSPACE/packaging/manjaro' && makepkg --noconfirm --syncdeps --cleanbuild"
su builder -c "cd '$GITHUB_WORKSPACE/packaging/manjaro' && makepkg --printsrcinfo > .SRCINFO"
- name: Lint PKGBUILD and package with namcap
run: |
set -euxo pipefail
cd "$GITHUB_WORKSPACE/packaging/manjaro"
namcap PKGBUILD
pkg_file="$(find . -maxdepth 1 -type f -name '*.pkg.tar.*' | head -n1)"
namcap "$pkg_file"
- name: Collect artifacts
run: |
set -euxo pipefail
mkdir -p artifacts
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/*.pkg.tar.* artifacts/
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/PKGBUILD artifacts/
cp -v "$GITHUB_WORKSPACE"/packaging/manjaro/.SRCINFO artifacts/
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: zoitechat-manjaro-package
path: artifacts/*
if-no-files-found: error