app=acpid
version=2.0.32
build=1sml
homepage="http://sourceforge.net/projects/acpid2/"
download=""
desc="Tools and daemon for implementing ACPI standard on Linux"
requires="musl"

build() {
  compileonlyfor x86_64
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z**
  cd $app-$version 
  fixbuilddirpermissions

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin

  make
  make install DESTDIR=$pkg 

  install -Dm 755 $srcdir/acpi_handler.sh $pkg/etc/acpi/acpi_handler.sh.new
  install -Dm 644 $srcdir/default $pkg/etc/acpi/events/default
  install -Dm 755 $srcdir/rc.acpid $pkg/etc/rc.d/rc.acpid

  cp COPYING $pkgdocs/
  head -n 100 Changelog > $pkgdocs/CHANGELOG

  mkfinalpkg
}

sha512sums="
c7afffdf9818504e1ac03b0ad693a05f772bfd07af9808262b3b6bb82ca4dabe6253c94e6dc59e5be6f0da9e815e8bcf2d3e16f02b23d0248b6bad4509e78be7  acpid-2.0.32.tar.xz
"
