void-packages/srcpkgs/libsmbios/template

70 lines
1.9 KiB
Bash

# Template file for 'libsmbios'
pkgname=libsmbios
version=2.4.2
revision=2
build_style=gnu-configure
configure_args="--sbindir=/usr/bin --disable-static"
hostmakedepends="automake doxygen gettext-devel help2man libtool pkg-config"
makedepends="libxml2-devel python3-devel"
checkdepends="python3"
short_desc="Library for SMBIOS access"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, OLS-2.1"
homepage="https://github.com/dell/libsmbios"
distfiles="https://github.com/dell/libsmbios/archive/v${version}.tar.gz"
checksum=ebfe18415e24bbec06d0a9ea1066c8dcd82982555373712713d7e194138650de
# explicitly list the subpackages to make sure they are installed in the
# right order:
subpackages="libsmbios-devel python3-libsmbios libsmbios-utils"
archs="i686* x86_64*"
pre_configure() {
./autogen.sh --no-configure
}
post_install() {
rm -rf ${DESTDIR}/etc/yum ${DESTDIR}/usr/lib/yum-plugins
vmkdir usr/include
cp -r ${wrksrc}/out/public-include/* ${DESTDIR}/usr/include
cp -r ${wrksrc}/src/include/smbios_c ${DESTDIR}/usr/include
}
libsmbios-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}
python3-libsmbios_package() {
depends="python3 ${sourcepkg}>=${version}_${revision}"
short_desc+=" - python bindings"
pycompile_module="libsmbios_c"
pkg_install() {
vmove ${py3_sitelib}
vmove usr/share/smbios-utils/cli.py
vmove usr/bin/smbios-battery-ctl
vmove usr/bin/smbios-keyboard-ctl
vmove usr/bin/smbios-lcd-brightness
vmove usr/bin/smbios-passwd
vmove usr/bin/smbios-sys-info
vmove usr/bin/smbios-thermal-ctl
vmove usr/bin/smbios-token-ctl
vmove usr/bin/smbios-wakeup-ctl
vmove usr/bin/smbios-wireless-ctl
}
}
libsmbios-utils_package() {
short_desc+=" - utilities"
pkg_install() {
vmove usr/bin
vmove usr/share/man/man1
}
}