diff options
-rwxr-xr-x | build-repo | 4 | ||||
-rwxr-xr-x | cleanbuild-repo | 17 | ||||
-rwxr-xr-x | pkg | 2 |
3 files changed, 19 insertions, 4 deletions
@@ -2,8 +2,6 @@ set -eax # note: we assume `abuild-keygen -a -i` has alr been run ALL_TARGET="$PWD/target" -if [[ "$RM_TARGET" != "" ]]; then rm -rf "$ALL_TARGET"; fi -mkdir -p "$ALL_TARGET" export APORTSDIR="$PWD/src" for REPOPATH in ./src/*; do cd "$REPOPATH"; @@ -13,7 +11,7 @@ for REPOPATH in ./src/*; do cd "$PKG"; PKG="$(basename "$PKG")"; - if [[ "$FILTER" == "" ]] || [[ "$FILTER" == "$REPO" ]] || [[ "$FILTER" == "$PKG" ]]; then + if [[ "$FILTER" == "" ]] || [[ "$FILTER" == "$REPO" ]] || [[ "$FILTER" == "$PKG" ]] || [[ "$FILTER" == "$REPO/$PKG" ]]; then if [[ "$NEWSUM" == "1" ]]; then abuild checksum; fi if [[ "$ROOTBLD" != "0" ]]; then abuild -P "$ALL_TARGET" rootbld diff --git a/cleanbuild-repo b/cleanbuild-repo new file mode 100755 index 0000000..3bb274f --- /dev/null +++ b/cleanbuild-repo @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh +set -e +# This script exists to be able to build repositories, from scratch, without having any existing packages prebuild in the target directory. +# It only works with rootbld. +ALL_TARGET="$PWD/target" +rm -rf "$ALL_TARGET" +mkdir "$ALL_TARGET" +source env +buildpkg() { + (cd src/"$1" && abuild -P "$ALL_TARGET" rootbld) +} + +# pkgs with dependents +buildpkg util/gcompat-libdl2 + +# build the rest +"$PWD/build-repo" @@ -24,4 +24,4 @@ elif [[ "$OPERATION" == "add" ]]; then sudo apk add --repository "$(busybox dirname "$(busybox realpath "$BIN")")/target/$REPO" "$PKG"; else syntax; -fi
\ No newline at end of file +fi |