void-packages/srcpkgs/libdwarf/template

51 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Template file for 'libdwarf'
pkgname=libdwarf
version=20180527
revision=1
wrksrc="dwarf-${version}"
build_wrksrc=libdwarf
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="http://www.prevanders.net/dwarf.html"
distfiles="http://prevanders.net/${pkgname}-${version}.tar.gz"
checksum=47e014211f3cfef54a78e8f6dea0b211c4825724871361adf39d9706eb9b0f1f
if [ "$CROSS_BUILD" ]; then
make_cmd="make HOSTCC=cc HOSTCFLAGS=-I./ HOSTLDFLAGS="
pre_build() {
# Makefile doesnt use $HOSTLDFLAGS when using $HOSTCC
sed -i -e 's|\$(HOSTCC) \$(HOSTCFLAGS) \$(LDFLAGS)|\$(HOSTCC) \$(HOSTCFLAGS) \$(HOSTLDFLAGS)|' Makefile
}
fi
do_install() {
install -dm755 $DESTDIR/usr/lib
install -m644 libdwarf.so $DESTDIR/usr/lib/
}
libdwarf-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
install -dm755 $PKGDESTDIR/usr/lib
install -m644 libdwarf.a $PKGDESTDIR/usr/lib
install -dm755 $PKGDESTDIR/usr/include/libdwarf
install -m644 libdwarf.h $PKGDESTDIR/usr/include/libdwarf/
install -m644 dwarf.h $PKGDESTDIR/usr/include/libdwarf/
}
}
libdwarf-doc_package() {
short_desc+=" - documentation"
pkg_install() {
install -dm755 $PKGDESTDIR/usr/share/doc/${pkgname}
install -m644 README NEWS *.pdf $PKGDESTDIR/usr/share/doc/${pkgname}
}
}