From 9ac300e528c6b0d6b74a25870b88491074b00093 Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Mon, 24 Mar 2025 12:37:24 -0400 Subject: [PATCH] cleanup and update README --- Makefile | 2 +- README.md | 16 ++++++++++++++-- makepkg.conf | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c1ebed7..7fba488 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,4 @@ build: podman build -t gitea.balki.me/balki/aur_builder:exp -t gitea.balki.me/balki/aur_builder:`date -I` . pull: - podman pull docker.io/archlinux:base-devel + podman pull docker.io/archlinux:base-devel diff --git a/README.md b/README.md index 2e30423..c92d832 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,25 @@ +Build Archlinux packages in rootless podman container +### Why -Command to build +1. `sudo` is run inside container (required for makepkg). Does not affect host system +2. Does not install unnecessary make dependencies in host system +3. Build runs in clean environment. + +### Usage + +1. Remove/Replace mirror url. I run [pacoloco](https://github.com/anatol/pacoloco) locally at archmirror.i.balki.me +2. Change PACKAGER setting to your name/email +3. Add AUR dependencies in a folder `deps/` (if any) + +### Command to build ``` cd ~/projects/mine/aur_builder/ podman build -t gitea.balki.me/balki/aur_builder:exp . ``` -Command to run +### Command to run ``` cd /home/balki/gotosocial_aur/ diff --git a/makepkg.conf b/makepkg.conf index db1bc49..bcd9acf 100644 --- a/makepkg.conf +++ b/makepkg.conf @@ -1,10 +1,14 @@ PACKAGER="Balakrishnan Balasubramanian " +# Do not build debug packages + for index in "${!OPTIONS[@]}"; do if [[ "${OPTIONS[$index]}" = *debug ]]; then OPTIONS["$index"]="!debug" fi done +# Enables all extra features supported by host CPU + CFLAGS="$CFLAGS -march=native -mtune=native" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"