From 73debdcfb1041e355f5dfaf66ae1b6c39503d5b9 Mon Sep 17 00:00:00 2001 From: Celestia Ludenberg Date: Mon, 8 Jun 2026 18:27:40 +0200 Subject: [PATCH] Add Cnchi PKGBUILD with local package support - Add packages/cnchi/PKGBUILD building from Antergos-NeXT/Cnchi fork - Add cnchi.install post-install script - Update packages.yaml to include cnchi - Update build-packages.py to prefer local PKGBUILDs over AUR --- build-packages.py | 26 +++++++------ packages.yaml | 1 + packages/cnchi/PKGBUILD | 75 ++++++++++++++++++++++++++++++++++++ packages/cnchi/cnchi.install | 4 ++ 4 files changed, 95 insertions(+), 11 deletions(-) create mode 100644 packages/cnchi/PKGBUILD create mode 100644 packages/cnchi/cnchi.install diff --git a/build-packages.py b/build-packages.py index 21674ee..d19d949 100644 --- a/build-packages.py +++ b/build-packages.py @@ -10,16 +10,20 @@ with open("packages.yaml") as f: os.makedirs("/tmp/pkgout", exist_ok=True) for pkg in pkgs: - clone_dir = f"/tmp/{pkg}" - - if os.path.exists(clone_dir): - shutil.rmtree(clone_dir) - - subprocess.run(["git", "clone", f"https://aur.archlinux.org/{pkg}.git", clone_dir]) - - subprocess.run(["chown", "-R", "builder:builder", clone_dir]) - subprocess.run(["su", "-", "builder", "-c", f"cd {clone_dir} && makepkg -s --noconfirm --noprogress --skippgpcheck --skipinteg"]) - - subprocess.run(f"cp {clone_dir}/*.pkg.tar.zst /tmp/pkgout/ || true", shell=True) + local_pkgbuild = f"packages/{pkg}/PKGBUILD" + build_dir = f"/tmp/{pkg}" + + if os.path.exists(build_dir): + shutil.rmtree(build_dir) + + if os.path.exists(local_pkgbuild): + shutil.copytree(f"packages/{pkg}", build_dir) + else: + subprocess.run(["git", "clone", f"https://aur.archlinux.org/{pkg}.git", build_dir]) + + subprocess.run(["chown", "-R", "builder:builder", build_dir]) + subprocess.run(["su", "-", "builder", "-c", f"cd {build_dir} && makepkg -s --noconfirm --noprogress --skippgpcheck --skipinteg"]) + + subprocess.run(f"cp {build_dir}/*.pkg.tar.zst /tmp/pkgout/ || true", shell=True) print("Done!") diff --git a/packages.yaml b/packages.yaml index d80563b..44a4541 100644 --- a/packages.yaml +++ b/packages.yaml @@ -2,3 +2,4 @@ packages: - antergos-wallpapers - yay - downgrade + - cnchi diff --git a/packages/cnchi/PKGBUILD b/packages/cnchi/PKGBUILD new file mode 100644 index 0000000..6062666 --- /dev/null +++ b/packages/cnchi/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Celestia Ludenberg +# Contributor: Antergos Team + +pkgname=cnchi +pkgver=0.16.51 +pkgrel=1 +pkgdesc="Antergos NeXT graphical installer" +arch=('any') +url="https://github.com/Antergos-NeXT/Cnchi" +license=('GPL3') +depends=( + 'gtk3' + 'python' + 'python-cairo' + 'python-gobject' + 'python-dbus' + 'python-requests' + 'python-chardet' + 'python-feedparser' + 'python-idna' + 'python-mako' + 'python-geoip2' + 'python-maxminddb' + 'python-passlib' + 'pyalpm' + 'python-pyparted' + 'parted' + 'dosfstools' + 'mtools' + 'ntfs-3g' + 'upower' + 'gocryptfs' + 'iso-codes' + 'python-libnacl' +) +makedepends=('git') +install=cnchi.install +source=("${pkgname}::git+https://github.com/Antergos-NeXT/Cnchi.git#branch=0.16.x") +sha256sums=('SKIP') + +package() { + cd "${srcdir}/${pkgname}" + + # Install Cnchi Python modules + install -dm755 "${pkgdir}/usr/share/cnchi" + cp -r src/* "${pkgdir}/usr/share/cnchi/" + cp -r data "${pkgdir}/usr/share/cnchi/" + cp -r ui "${pkgdir}/usr/share/cnchi/" + cp -r scripts "${pkgdir}/usr/share/cnchi/" + cp -r po "${pkgdir}/usr/share/cnchi/" + cp -r utils "${pkgdir}/usr/share/cnchi/" + cp run "${pkgdir}/usr/share/cnchi/" + cp cnchi.desktop "${pkgdir}/usr/share/cnchi/" + cp requirements.txt "${pkgdir}/usr/share/cnchi/" + + # Create executable wrapper + install -dm755 "${pkgdir}/usr/bin" + cat > "${pkgdir}/usr/bin/cnchi" << 'EOF' +#!/bin/bash +exec /usr/bin/python3 /usr/share/cnchi/cnchi.py "$@" +EOF + chmod 755 "${pkgdir}/usr/bin/cnchi" + + # Desktop file + install -dm755 "${pkgdir}/usr/share/applications" + cp cnchi.desktop "${pkgdir}/usr/share/applications/" + + # Icons + install -dm755 "${pkgdir}/usr/share/icons" + cp -r data/icons/* "${pkgdir}/usr/share/icons/" 2>/dev/null || true + + # License + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + cp COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/packages/cnchi/cnchi.install b/packages/cnchi/cnchi.install new file mode 100644 index 0000000..8abb665 --- /dev/null +++ b/packages/cnchi/cnchi.install @@ -0,0 +1,4 @@ +post_install() { + # Register Cnchi as a potential live session installer + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor 2>/dev/null || true +}