APP=libdaemon
VERSION=0.14
BUILD=1sml
HOMEPAGE='http://0pointer.de/lennart/projects/libdaemon/'
DOWNLOAD='http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz'
DESC="Lightweight library for writing Unix daemons"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION 
  fixbuilddirpermissions

  patch -p1 < $SRCDIR/libdaemon-0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch

  ./configure \
    --prefix="" \
    --disable-static \
    $BUILDDIST

  make
  make install DESTDIR=$PKG 

  cp LICENSE $PKGDOCS/
 
  mkfinalpkg
}

SHA512SUMS="
f2a756af88b9d4a83855e1eecf2127d180b7412a49039dbc76d430b2297a14fea3d012e799f36e12193953d05e6e8be2210353b0e7ad53c984bb668d65097ef3  libdaemon-0.14.tar.lz
8927b2a97bd862e101ff2a3663ef0b07633d03e9bce7148f1908899c4bae1d2b607699b7de3fdd28401635a59494708162a203307539a43ced537d149fe9caac  libdaemon-0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch
"