Build entire elfutils repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: libelf
|
name: elfutils
|
||||||
description: ELF handling library
|
description: Handle ELF object files and DWARF debugging information (Utilities)
|
||||||
version: "0.195"
|
version: "0.195"
|
||||||
revision: 1
|
revision: 2
|
||||||
url: https://sourceware.org/elfutils/
|
url: https://sourceware.org/elfutils/
|
||||||
license: GPL2-or-later OR LGPL3-or-later
|
license: GPL2-or-later OR LGPL3-or-later
|
||||||
maintainers:
|
maintainers:
|
||||||
@@ -9,6 +9,30 @@ maintainers:
|
|||||||
architecture: any
|
architecture: any
|
||||||
type: source
|
type: source
|
||||||
depends:
|
depends:
|
||||||
|
- gcc-libs
|
||||||
|
- glibc
|
||||||
|
- libarchive
|
||||||
|
- libelf=0.195
|
||||||
|
- sh
|
||||||
|
make_depends:
|
||||||
|
- bzip2
|
||||||
|
- curl
|
||||||
|
- json-c
|
||||||
|
- libarchive
|
||||||
|
- sqlite
|
||||||
|
- xz-utils
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
|
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
|
- bzip2
|
||||||
- curl
|
- curl
|
||||||
- glibc
|
- glibc
|
||||||
@@ -16,11 +40,13 @@ depends:
|
|||||||
- xz-utils
|
- xz-utils
|
||||||
- zlib
|
- zlib
|
||||||
- zstd
|
- zstd
|
||||||
make_depends:
|
- name: debuginfod
|
||||||
|
description: Handle ELF object files and DWARF debugging information (Debuginfod)
|
||||||
|
depends:
|
||||||
|
- gcc-libs
|
||||||
|
- glibc
|
||||||
|
- json-c
|
||||||
- libarchive
|
- libarchive
|
||||||
|
- libelf=0.195
|
||||||
- sqlite
|
- sqlite
|
||||||
downloads:
|
- xz-utils
|
||||||
- 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
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ build() {
|
|||||||
|
|
||||||
export CFLAGS="${CFLAGS} -ffat-lto-objects -g"
|
export CFLAGS="${CFLAGS} -ffat-lto-objects -g"
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--disable-debuginfod \
|
--sysconfdir=/etc \
|
||||||
--enable-libdebuginfod=dummy \
|
--program-prefix="eu-" \
|
||||||
--enable-deterministic-archives \
|
--enable-deterministic-archives \
|
||||||
--enable-maintainer-mode
|
--enable-maintainer-mode
|
||||||
make
|
make
|
||||||
@@ -31,16 +31,45 @@ check() {
|
|||||||
make 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
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package_elfutils() {
|
||||||
make -C libelf DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
# Install pkgconfig file
|
cd "$BPM_OUTPUT"
|
||||||
install -Dm644 config/libelf.pc "$BPM_OUTPUT"/usr/lib/pkgconfig/libelf.pc
|
|
||||||
|
# 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 package licenses
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING-GPLV2 "$BPM_OUTPUT"/usr/share/licenses/libelf/COPYING-GPLV2
|
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/elfutils
|
||||||
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
|
|
||||||
|
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