pkg-dist.mk, pkg.sh: Build RPMs in dist/build, drop the pckg spelling #127

Merged
Jan Lindemann merged 3 commits from jan/feature/20260924-pkg-dist-mk-pkg-sh-build-rpms-in-dist-build-drop-the-pckg-spelling into master 2026-09-24 13:15:37 +02:00 AGit

2026-09-24

pkg-dist.mk, pkg.sh: Rename PCKG variables to PKG
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 7m1s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m3s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m46s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m51s
CI / Packaging test (push) Successful in 0s
The previous commit renamed the dist/pckg directory to dist/pkg but kept
the pckg spelling in the variables that reference it.

Rename the variables to PKG:

- DIST_PCKG_DIR to DIST_PKG_DIR (make/pkg-dist.mk, pkg.sh)
- PCKG_TAR to PKG_TAR, PCKG_ROOT to PKG_ROOT and DIST_PCKG_RPM to
  DIST_PKG_RPM (make/pkg-dist.mk)

None of the other 320 janware projects use these variables.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-24 13:03:28 +02:00
pkg-dist.mk, pkg.sh: Rename dist/pckg to dist/pkg
The directory holding the built packages uses the pckg abbreviation while
every other package-related name in the build system uses pkg (PKG_PROJECT,
PKG_FORMAT, PKG_ARCH).

Rename dist/pckg to dist/pkg, in the DIST_PCKG_DIR variable and in the
recipes that hardcode the path.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
2026-09-24 13:03:28 +02:00
pkg-dist.mk, pkg.sh: Build RPMs in dist/build
pkg.sh hardcodes $HOME/rpmbuild as the rpmbuild topdir while make computes
the same location separately as PKG_DIR_BUILD, and a sandboxed shell cannot
build at all: rpmbuild writes its scratch trees and results under the
topdir, outside the project.

- Default PKG_DIR_BUILD to $(TOPDIR)/dist/build for non-root builds and
  pass it to pkg.sh as the new -T option (root keeps /usr/src/packages;
  local.mk can still override)
- Build with --define _topdir pointing at that directory, resolved to an
  absolute path, so the scratch tree, RPMS and SRPMS stay in the project
  tree where make clean drops them

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
2026-09-24 13:03:27 +02:00