# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libdaemon
version=0.14
build=1sml
homepage="http://0pointer.de/lennart/projects/libdaemon/"
download="http://0pointer.de/lennart/projects/libdaemon/libdaemon-$version.tar.gz"
desc="Lightweight library for writing Unix daemons"
requires="musl"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

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

  applypatch $srcdir/libdaemon-0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch
}

build() {
  ./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
"
