void-packages/srcpkgs/libpfm4/template

57 lines
1.3 KiB
Bash

# Template file for 'libpfm4'
pkgname=libpfm4
version=4.13.0
revision=1
build_style=gnu-makefile
build_helper=python3
make_use_env=yes
hostmakedepends="python3-setuptools swig"
makedepends="python3-devel"
short_desc="Library to program the performance monitoring events"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="MIT"
homepage="https://perfmon2.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/perfmon2/libpfm-${version}.tar.gz"
checksum=d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1
conflicts="papi<7.0.0_1"
export XBPS_TARGET_MACHINE
do_build() {
msg_normal "Building libpfm4\n"
make ${makejobs} PREFIX=/usr
msg_normal "Building Python 3 bindings\n"
cd python
python3 setup.py build
}
do_install() {
make install DESTDIR=${DESTDIR} PREFIX=/usr
{
find include lib -name '*.h' -o -name '*.c' |
xargs grep -h Copyright
cat COPYING
} >license
vlicense license
}
libpfm4-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
conflicts="papi-devel<7.0.0_1"
pkg_install() {
vmove usr/share/man/man3
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
python3-perfmon_package() {
short_desc+=" - Python 3 bindings"
pkg_install() {
cd python
python3 setup.py install --prefix=/usr --root=${PKGDESTDIR}
}
}