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)
|
||||
|
||||
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!")
|
||||
|
||||
Reference in New Issue
Block a user