Username: Password: Remember me
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
# Contributor: daniel g. siegel <dgsiegel@gmail.com>
 
pkgname=libsmbios
pkgver=2.4.2
pkgrel=1
pkgdesc="A library for providing access to as much BIOS information as possible"
arch=('x86_64')
url="https://github.com/dell/libsmbios"
license=('GPL' 'custom')
depends=('gcc-libs')
makedepends=('libxml2' 'python' 'chrpath' 'doxygen' git cppunit help2man)
optdepends=('python: tools')
_commit=f4031c3a261d48cdfcb38ed7b2ad1089703937f7  # tags/v2.4.2
source=("git+https://github.com/dell/libsmbios.git#commit=$_commit")
sha256sums=('SKIP')
 
pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}
 
prepare() {
  cd $pkgname
  ./autogen.sh --no-configure
}
 
build() {
  unset MAKEFLAGS
  cd $pkgname
  mkdir build
  cd build
  ../configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --disable-static
  make
}
 
package() {
  cd $pkgname/build
  make DESTDIR="${pkgdir}" install
 
  chrpath -d "${pkgdir}/usr/bin/smbios-sys-info-lite"
  install -m755 -d "${pkgdir}/usr/include"
 
  cp -a ../src/include/* "${pkgdir}/usr/include/"
  cp -a out/public-include/* "${pkgdir}/usr/include/"
 
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 ../COPYING-OSL "${pkgdir}/usr/share/licenses/${pkgname}/"
}