index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-05-22 11:26:15 +0200 |
---|---|---|
committer | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-05-22 11:26:15 +0200 |
commit | 58fb713daca8368b897a87c39c6449cba0f4601f (patch) | |
tree | 3e824ca791568910825f9d7d4e87d3ca8e950674 /bin | |
parent | 55d6ca33023ad8cbd1420a54ffc1e49e5453e942 (diff) |
-rwxr-xr-x | bin/local-build-package | 37 |
diff --git a/bin/local-build-package b/bin/local-build-package index e0b02dc..fca63f2 100755 --- a/bin/local-build-package +++ b/bin/local-build-package @@ -153,23 +153,21 @@ if ! ${nobuild}; then git -C "${repo_path}" pull done + if [ "${arch}" == 'any' ]; then + upstream_arch='any' + build_arch=$(pacman-conf Architecture) + else + upstream_arch='x86_64' + build_arch="${arch}" + fi + repository=$1 package=$2 - case $repository in - core) - repo_path='../work/repos/packages' - ;; - extra) - repo_path='../work/repos/packages' - ;; - community) - repo_path='../work/repos/community' - ;; - *) - >&2 echo 'Repository is either "core", "extra" or "community"' - usage - esac - git_revision=$(git -C "${repo_path}" rev-parse HEAD) + git_revision=$( + git -C "${repo_paths__state}" archive HEAD -- "${repository}-${upstream_arch}/${package}" \ + | tar -Ox \ + | cut -d' ' -f4 + ) mod_git_revision=$(git -C "${repo_paths__archlinux32}" stash create) if [ -z "${mod_git_revision}" ]; then @@ -177,9 +175,9 @@ if ! ${nobuild}; then fi if [[ -z "${straws[:with_build_support:]}" ]]; then - build_command="staging-${arch}-build" + build_command="staging-${build_arch}-build" else - build_command='staging-with-build-support-'"${arch}"'-build' + build_command='staging-with-build-support-'"${build_arch}"'-build' fi parameters="-r ${archbuild_chroots}" @@ -187,10 +185,7 @@ if ! ${nobuild}; then parameters='-- -- --nocheck' fi - git_repo=$(find_repository_with_commit "${git_revision}") - find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}" - - extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}" + extract_source_directory "${repository}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}" '0' rm -f \ ./*"-${arch}.pkg.tar.xz" ./*"-${arch}.pkg.tar.xz.sig" \ |