26 lines
649 B
Bash
Executable File
26 lines
649 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
pkg="$(cat .package-path)"
|
|
[[ -f "$pkg" ]] || { echo "Package not found: $pkg" >&2; exit 1; }
|
|
|
|
echo "==> Package metadata"
|
|
pacman -Qip "$pkg"
|
|
namcap "$pkg" || {
|
|
echo "namcap reported warnings; review them above."
|
|
}
|
|
|
|
tmp="$(mktemp -d)"
|
|
trap 'rm -rf "$tmp"' EXIT
|
|
bsdtar -xf "$pkg" -C "$tmp"
|
|
bin="$tmp/usr/bin/ratune"
|
|
[[ -x "$bin" ]] || { echo "ratune binary missing or not executable" >&2; exit 1; }
|
|
file "$bin"
|
|
ldd "$bin" | tee "$tmp/ldd.txt"
|
|
if grep -q 'not found' "$tmp/ldd.txt"; then
|
|
echo "Unresolved shared library dependency detected" >&2
|
|
exit 1
|
|
fi
|
|
"$bin" --version
|
|
echo "Package smoke test passed."
|