Build entire elfutils repository

This commit is contained in:
2026-05-09 13:51:13 +03:00
parent a198b7a12b
commit 4ef0931782
2 changed files with 71 additions and 16 deletions
+38 -9
View File
@@ -17,8 +17,8 @@ build() {
export CFLAGS="${CFLAGS} -ffat-lto-objects -g"
./configure --prefix=/usr \
--disable-debuginfod \
--enable-libdebuginfod=dummy \
--sysconfdir=/etc \
--program-prefix="eu-" \
--enable-deterministic-archives \
--enable-maintainer-mode
make
@@ -31,16 +31,45 @@ check() {
make check
}
_pick() {
local p="$1" f d; shift
for f; do
[ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; }
d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make -C libelf DESTDIR="$BPM_OUTPUT" install
package_elfutils() {
make DESTDIR="$BPM_OUTPUT" install
# Install pkgconfig file
install -Dm644 config/libelf.pc "$BPM_OUTPUT"/usr/lib/pkgconfig/libelf.pc
cd "$BPM_OUTPUT"
# Move libelf files into split package
_pick libelf etc/debuginfod
_pick libelf etc/profile.d/*
_pick libelf usr/{include,lib}
_pick libelf usr/share/man/*/{,lib}elf*
# Move debuginfod files into split package
_pick debuginfod usr/bin/debuginfod*
_pick debuginfod usr/share/fish/vendor_conf.d/debuginfod.fish
_pick debuginfod usr/share/man/*/debuginfod*
# Install package licenses
install -Dm644 "$BPM_SOURCE"/COPYING-GPLV2 "$BPM_OUTPUT"/usr/share/licenses/libelf/COPYING-GPLV2
install -Dm644 "$BPM_SOURCE"/COPYING-LGPLV3 "$BPM_OUTPUT"/usr/share/licenses/libelf/COPYING-LGPLV3
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libelf/COPYING
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/elfutils
}
package_libelf() {
# Install package licenses
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/libelf
}
package_debuginfod() {
# Install package licenses
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/debuginfod
}