Switch to new package format

This commit is contained in:
2026-06-13 20:00:43 +03:00
parent b03c0f8a33
commit 0093f6bf1e
2 changed files with 4 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
make
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
install -Dm755 os-prober linux-boot-prober -t "$BPM_OUTPUT"/usr/bin
install -Dm755 newns "$BPM_OUTPUT"/usr/lib/os-prober/newns
install -Dm755 common.sh "$BPM_OUTPUT"/usr/share/os-prober/common.sh
for dir in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
install -dm755 "$BPM_OUTPUT"/usr/lib/${dir}
install -m755 -t "$BPM_OUTPUT"/usr/lib/${dir} ${dir}/common/*
[[ -d "${dir}"/x86 ]] && cp -r ${dir}/x86/* "$BPM_OUTPUT"/usr/lib/${dir}
done
install -Dm755 os-probes/mounted/powerpc/20macosx "$BPM_OUTPUT"/usr/lib/os-probes/mounted/20macosx
install -dm755 "$BPM_OUTPUT"/var/lib/os-prober
}