Files
MX_Pmodule/crystfel/build
T
duan_jandClaude Fable 5.1 f01c903b03 crystfel: remove committed conflict markers, fetch from DESY GitLab
build had 18 merge-conflict marker lines committed in 6abd7ea, so bash
failed on every hook. Rewritten clean with cd + std::die guards (modbuild
has no errexit in hooks) and an indexamajig existence check after install.

desy.de/~twhite tarball URL hangs (curl: (28) timed out, 0 bytes) from Ra
and outside. Switched urls to the same release tag on gitlab.desy.de and
updated the sha256 for crystfel-0.13.0.tar.gz.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-26 17:57:10 +01:00

28 lines
1.3 KiB
Python
Executable File

#!/usr/bin/env modbuild
# upstream INSTALL.md: meson setup build && meson compile && meson install.
# default pbuild::prep downloads + sha-verifies + unpacks the tarball (urls/shasums
# in files/config.yaml, strip_dirs:1 puts the sources at $SRC_DIR root).
# meson.build needs meson >= 0.60; Ra system meson is too old, so use a
# user-local one: `pip3 install --user meson ninja` (lands in ~/.local/bin).
# cd into SRC_DIR explicitly: hooks are not guaranteed to start there, and a
# wrong cwd silently builds nothing (modbuild has no errexit in hooks).
MESON="${HOME}/.local/bin/meson"
pbuild::configure() {
[[ -x "$MESON" ]] || std::die 42 "meson not found at $MESON - run: pip3 install --user meson ninja"
cd "${SRC_DIR}" || std::die 42 "cannot cd to SRC_DIR=${SRC_DIR}"
"$MESON" setup build --prefix="${PREFIX}" || std::die 42 "meson setup failed - check build/meson-logs/meson-log.txt"
}
pbuild::compile() {
cd "${SRC_DIR}" || std::die 42 "cannot cd to SRC_DIR=${SRC_DIR}"
"$MESON" compile -C build || std::die 42 "meson compile failed"
}
pbuild::install() {
cd "${SRC_DIR}" || std::die 42 "cannot cd to SRC_DIR=${SRC_DIR}"
"$MESON" install -C build || std::die 42 "meson install failed"
[[ -x "${PREFIX}/bin/indexamajig" ]] || std::die 42 "indexamajig missing from ${PREFIX}/bin after install"
}