Build entire elfutils repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: libelf
|
||||
description: ELF handling library
|
||||
name: elfutils
|
||||
description: Handle ELF object files and DWARF debugging information (Utilities)
|
||||
version: "0.195"
|
||||
revision: 1
|
||||
revision: 2
|
||||
url: https://sourceware.org/elfutils/
|
||||
license: GPL2-or-later OR LGPL3-or-later
|
||||
maintainers:
|
||||
@@ -9,18 +9,44 @@ maintainers:
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- gcc-libs
|
||||
- glibc
|
||||
- libarchive
|
||||
- libelf=0.195
|
||||
- sh
|
||||
make_depends:
|
||||
- bzip2
|
||||
- curl
|
||||
- glibc
|
||||
- json-c
|
||||
- libarchive
|
||||
- sqlite
|
||||
- xz-utils
|
||||
- zlib
|
||||
- zstd
|
||||
make_depends:
|
||||
- libarchive
|
||||
- sqlite
|
||||
downloads:
|
||||
- url: https://sourceware.org/ftp/elfutils/${BPM_PKG_VERSION}/elfutils-${BPM_PKG_VERSION}.tar.bz2
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: 37629fdf7f1f3dc2818e138fca2b8094177d6c2d0f701d3bb650a561218dc026
|
||||
split_packages:
|
||||
- name: elfutils
|
||||
- name: libelf
|
||||
description: Handle ELF object files and DWARF debugging information (Libraries)
|
||||
depends:
|
||||
- bzip2
|
||||
- curl
|
||||
- glibc
|
||||
- json-c
|
||||
- xz-utils
|
||||
- zlib
|
||||
- zstd
|
||||
- name: debuginfod
|
||||
description: Handle ELF object files and DWARF debugging information (Debuginfod)
|
||||
depends:
|
||||
- gcc-libs
|
||||
- glibc
|
||||
- json-c
|
||||
- libarchive
|
||||
- libelf=0.195
|
||||
- sqlite
|
||||
- xz-utils
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user