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
This commit is contained in:
+15
-11
@@ -10,16 +10,20 @@ with open("packages.yaml") as f:
|
|||||||
os.makedirs("/tmp/pkgout", exist_ok=True)
|
os.makedirs("/tmp/pkgout", exist_ok=True)
|
||||||
|
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
clone_dir = f"/tmp/{pkg}"
|
local_pkgbuild = f"packages/{pkg}/PKGBUILD"
|
||||||
|
build_dir = f"/tmp/{pkg}"
|
||||||
if os.path.exists(clone_dir):
|
|
||||||
shutil.rmtree(clone_dir)
|
if os.path.exists(build_dir):
|
||||||
|
shutil.rmtree(build_dir)
|
||||||
subprocess.run(["git", "clone", f"https://aur.archlinux.org/{pkg}.git", clone_dir])
|
|
||||||
|
if os.path.exists(local_pkgbuild):
|
||||||
subprocess.run(["chown", "-R", "builder:builder", clone_dir])
|
shutil.copytree(f"packages/{pkg}", build_dir)
|
||||||
subprocess.run(["su", "-", "builder", "-c", f"cd {clone_dir} && makepkg -s --noconfirm --noprogress --skippgpcheck --skipinteg"])
|
else:
|
||||||
|
subprocess.run(["git", "clone", f"https://aur.archlinux.org/{pkg}.git", build_dir])
|
||||||
subprocess.run(f"cp {clone_dir}/*.pkg.tar.zst /tmp/pkgout/ || true", shell=True)
|
|
||||||
|
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!")
|
print("Done!")
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ packages:
|
|||||||
- antergos-wallpapers
|
- antergos-wallpapers
|
||||||
- yay
|
- yay
|
||||||
- downgrade
|
- downgrade
|
||||||
|
- cnchi
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
# Maintainer: Celestia Ludenberg <ash8820@proton.me>
|
||||||
|
# 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}/"
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user