Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
* Move the Nix bootstrap from *scripts/init-nix.sh* to *scripts/nix/init.sh* with split-out helpers in *scripts/nix/lib/* * Update Arch/Debian/Fedora packaging hooks to call */usr/lib/package-manager/nix/init.sh* * Keep bootstrap behavior the same while improving maintainability and reuse https://chatgpt.com/share/693c7159-b340-800f-929e-2515eeb0dd03
57 lines
2.2 KiB
Makefile
Executable File
57 lines
2.2 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
%:
|
|
dh $@
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Disable automatic build + tests for Debian package
|
|
#
|
|
# The package is effectively a wrapper around the project source and the
|
|
# Nix flake. We do not need dh_auto_build to invoke the top-level Makefile,
|
|
# because that Makefile is meant for developer workflows (venv, setup, etc.)
|
|
# and would fail in the minimal build environment.
|
|
# ---------------------------------------------------------------------------
|
|
override_dh_auto_build:
|
|
# No build step required for this package; skip calling the top-level Makefile.
|
|
:
|
|
|
|
override_dh_auto_test:
|
|
# We do not run tests as part of the Debian package build.
|
|
:
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Install phase: copy wrapper + init script + full project source
|
|
# ---------------------------------------------------------------------------
|
|
override_dh_auto_install:
|
|
# Create target directories
|
|
install -d debian/package-manager/usr/bin
|
|
install -d debian/package-manager/usr/lib/package-manager
|
|
|
|
# Install wrapper
|
|
install -m0755 scripts/pkgmgr-wrapper.sh \
|
|
debian/package-manager/usr/bin/pkgmgr
|
|
|
|
# Install shared Nix init script
|
|
install -d debian/package-manager/usr/lib/package-manager/nix
|
|
install -m0755 scripts/nix/init.sh \
|
|
debian/package-manager/usr/lib/package-manager/nix/init.sh
|
|
|
|
# Copy full project source into /usr/lib/package-manager,
|
|
# but do not include the debian/ directory itself.
|
|
find . -mindepth 1 -maxdepth 1 \
|
|
! -name debian \
|
|
! -name .git \
|
|
-exec cp -a {} debian/package-manager/usr/lib/package-manager/ \;
|
|
|
|
# Remove packaging-only and development artefacts from the installed tree
|
|
rm -rf \
|
|
debian/package-manager/usr/lib/package-manager/debian \
|
|
debian/package-manager/usr/lib/package-manager/PKGBUILD \
|
|
debian/package-manager/usr/lib/package-manager/Dockerfile \
|
|
debian/package-manager/usr/lib/package-manager/.git \
|
|
debian/package-manager/usr/lib/package-manager/.github \
|
|
debian/package-manager/usr/lib/package-manager/tests \
|
|
debian/package-manager/usr/lib/package-manager/.gitignore \
|
|
debian/package-manager/usr/lib/package-manager/__pycache__ \
|
|
debian/package-manager/usr/lib/package-manager/.gitkeep || true
|