CI / security-codeql (push) Blocked by required conditions
CI / test-unit (push) Blocked by required conditions
CI / test-integration (push) Blocked by required conditions
CI / test-env-virtual (push) Blocked by required conditions
CI / test-env-nix (push) Blocked by required conditions
CI / test-e2e (push) Blocked by required conditions
CI / test-virgin-user (push) Blocked by required conditions
CI / test-virgin-root (push) Blocked by required conditions
CI / lint-shell (push) Blocked by required conditions
CI / lint-python (push) Blocked by required conditions
CI / lint-docker (push) Blocked by required conditions
CodeQL Advanced / Check security (none, actions) (push) Blocked by required conditions
CodeQL Advanced / Check security (none, python) (push) Blocked by required conditions
Test Units / test-unit (push) Blocked by required conditions
Test Code Integration / test-integration (push) Blocked by required conditions
Test OS Containers / test-env-virtual (arch) (push) Blocked by required conditions
Test OS Containers / test-env-virtual (centos) (push) Blocked by required conditions
Test OS Containers / test-env-virtual (debian) (push) Blocked by required conditions
Test OS Containers / test-env-virtual (fedora) (push) Blocked by required conditions
Test OS Containers / test-env-virtual (ubuntu) (push) Blocked by required conditions
Test Virgin Nix (flake only) / test-env-nix (arch) (push) Blocked by required conditions
Test Virgin Nix (flake only) / test-env-nix (centos) (push) Blocked by required conditions
Test Virgin Nix (flake only) / test-env-nix (debian) (push) Blocked by required conditions
Test Virgin Nix (flake only) / test-env-nix (fedora) (push) Blocked by required conditions
Test Virgin Nix (flake only) / test-env-nix (ubuntu) (push) Blocked by required conditions
Test End-To-End / test-e2e (arch) (push) Blocked by required conditions
Test End-To-End / test-e2e (centos) (push) Blocked by required conditions
Test End-To-End / test-e2e (debian) (push) Blocked by required conditions
Test End-To-End / test-e2e (fedora) (push) Blocked by required conditions
Test End-To-End / test-e2e (ubuntu) (push) Blocked by required conditions
Test Virgin User / test-virgin-user (arch) (push) Blocked by required conditions
Test Virgin User / test-virgin-user (centos) (push) Blocked by required conditions
Test Virgin User / test-virgin-user (debian) (push) Blocked by required conditions
Test Virgin User / test-virgin-user (fedora) (push) Blocked by required conditions
Test Virgin User / test-virgin-user (ubuntu) (push) Blocked by required conditions
Test Virgin Root / test-virgin-root (arch) (push) Blocked by required conditions
Test Virgin Root / test-virgin-root (centos) (push) Blocked by required conditions
Test Virgin Root / test-virgin-root (debian) (push) Blocked by required conditions
Test Virgin Root / test-virgin-root (fedora) (push) Blocked by required conditions
Test Virgin Root / test-virgin-root (ubuntu) (push) Blocked by required conditions
ShellCheck / lint-shell (push) Blocked by required conditions
Ruff (Python code sniffer) / lint-python (push) Blocked by required conditions
Docker Linter / Lint Dockerfile (push) Blocked by required conditions
Mark stable commit / mark-stable (push) Waiting to run
87 lines
2.4 KiB
Bash
87 lines
2.4 KiB
Bash
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
|
|
|
pkgname=package-manager
|
|
pkgver=2.0.5
|
|
pkgrel=1
|
|
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
|
arch=('any')
|
|
url="https://github.com/kevinveenbirkenbach/package-manager"
|
|
license=('MIT')
|
|
|
|
# Nix is required at runtime to run pkgmgr via the flake.
|
|
# On Arch x86_64 we can depend on the distro package.
|
|
# On other arches (e.g. ARM) we only declare it as optional because the
|
|
# repo package may be broken/out-of-sync; installation can be done via the official installer.
|
|
depends=()
|
|
optdepends=('nix: required to run pkgmgr via flake')
|
|
|
|
if [[ "${CARCH}" == "x86_64" ]]; then
|
|
depends=('nix')
|
|
optdepends=()
|
|
fi
|
|
|
|
makedepends=('rsync')
|
|
|
|
install=${pkgname}.install
|
|
|
|
# Local source checkout — avoids the tarball requirement.
|
|
# We build from the project root (two levels above packaging/arch/).
|
|
source=()
|
|
sha256sums=()
|
|
|
|
# Local source directory name under $srcdir
|
|
_srcdir_name="source"
|
|
|
|
prepare() {
|
|
mkdir -p "$srcdir/$_srcdir_name"
|
|
|
|
local project_root
|
|
project_root="$(cd "$startdir/../.." && pwd)"
|
|
|
|
rsync -a \
|
|
--exclude=".git" \
|
|
--exclude=".github" \
|
|
--exclude="pkg" \
|
|
--exclude="srcpkg" \
|
|
--exclude="packaging" \
|
|
--exclude="assets" \
|
|
"$project_root/" "$srcdir/$_srcdir_name/"
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/$_srcdir_name"
|
|
:
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/$_srcdir_name"
|
|
|
|
# Install the wrapper into /usr/bin
|
|
install -Dm0755 "scripts/launcher.sh" \
|
|
"$pkgdir/usr/bin/pkgmgr"
|
|
|
|
# Install Nix bootstrap (init + lib)
|
|
install -d "$pkgdir/usr/lib/package-manager/nix"
|
|
cp -a scripts/nix/* "$pkgdir/usr/lib/package-manager/nix/"
|
|
chmod 0755 "$pkgdir/usr/lib/package-manager/nix/init.sh"
|
|
|
|
# Install the full repository into /usr/lib/package-manager
|
|
mkdir -p "$pkgdir/usr/lib/package-manager"
|
|
|
|
# Copy entire project tree from our local source checkout
|
|
cp -a . "$pkgdir/usr/lib/package-manager/"
|
|
|
|
# Remove packaging-only and development artefacts from the installed tree
|
|
rm -rf \
|
|
"$pkgdir/usr/lib/package-manager/.git" \
|
|
"$pkgdir/usr/lib/package-manager/.github" \
|
|
"$pkgdir/usr/lib/package-manager/tests" \
|
|
"$pkgdir/usr/lib/package-manager/PKGBUILD" \
|
|
"$pkgdir/usr/lib/package-manager/Dockerfile" \
|
|
"$pkgdir/usr/lib/package-manager/debian" \
|
|
"$pkgdir/usr/lib/package-manager/packaging" \
|
|
"$pkgdir/usr/lib/package-manager/.gitignore" \
|
|
"$pkgdir/usr/lib/package-manager/__pycache__" \
|
|
"$pkgdir/usr/lib/package-manager/.gitkeep" || true
|
|
}
|