47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
# Template file for 'libdwarf'
|
||
pkgname=libdwarf
|
||
version=20191002
|
||
revision=1
|
||
build_style=gnu-configure
|
||
configure_args="--prefix=/usr --enable-shared"
|
||
makedepends="elfutils-devel"
|
||
short_desc="DWARF Debugging Information Format Library"
|
||
maintainer="John Regan <john@jrjrtech.com>"
|
||
license="LGPL-2.1-only"
|
||
homepage="https://www.prevanders.net/dwarf.html"
|
||
distfiles="https://prevanders.net/${pkgname}-${version}.tar.gz"
|
||
checksum=c1594995813653e7ce6dabc36f86b2074598fedacf8b789ada6c0f47a5f12f49
|
||
|
||
if [ "$CROSS_BUILD" ]; then
|
||
hostmakedepends+=" elfutils-devel"
|
||
make_cmd="make HOSTCC=cc HOSTCFLAGS=-I./ HOSTLDFLAGS="
|
||
|
||
pre_build() {
|
||
# Makefile doesn’t use $HOSTLDFLAGS when using $HOSTCC
|
||
sed -i -e 's|\$(HOSTCC) \$(HOSTCFLAGS) \$(LDFLAGS)|\$(HOSTCC) \$(HOSTCFLAGS) \$(HOSTLDFLAGS)|' Makefile
|
||
}
|
||
fi
|
||
|
||
post_install() {
|
||
rm -rf ${PKGDESTDIR}/usr/share/libdwarf/libdwarf-devel
|
||
}
|
||
|
||
libdwarf-devel_package() {
|
||
short_desc+=" - development files"
|
||
depends="${sourcepkg}>=${version}_${revision}"
|
||
pkg_install() {
|
||
vmove usr/include
|
||
vmove "usr/lib/*.so"
|
||
vmove "usr/lib/*.a"
|
||
}
|
||
}
|
||
|
||
libdwarf-doc_package() {
|
||
archs=noarch
|
||
short_desc+=" - documentation"
|
||
pkg_install() {
|
||
install -dm755 $PKGDESTDIR/usr/share/doc/${pkgname}
|
||
install -m644 README NEWS libdwarf/*.pdf $PKGDESTDIR/usr/share/doc/${pkgname}
|
||
}
|
||
}
|