app=conky
version=1.11.6
build=1sml
homepage="https://github.com/brndnmtthws/conky"
download="https://github.com/brndnmtthws/conky/archive/refs/tags/v1.11.6.tar.gz"
desc="Light-weight system monitor for X"
requires="curl lua toluapp imlib2 xorg-server"

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

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

  # Don't link with netbsd-curses, as it causes conky to segfault
  # Also, we are following the old network interface naming scheme

  mkdir -p smbuild && cd smbuild
  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_WLAN=ON \
    -DBUILD_WEATHER_METAR=ON \
    -DBUILD_XDBE=ON \
    -DBUILD_XSHAPE=ON \
    -DBUILD_CURL=ON \
    -DBUILD_IMLIB2=ON \
    -DBUILD_RSS=ON \
    -DBUILD_LUA_CAIRO=ON \
    -DBUILD_LUA_IMLIB2=ON \
    -DDEFAULTNETDEV=eth0 \
    -DBUILD_NCURSES=OFF 

  make
  make install DESTDIR=$pkg 

  cp ../{LICENSE.*,COPYING} $pkgdocs/

  mkfinalpkg
}

sha512sums="
998e7c0d60ecfb6ffb65452f28ff3d2d870c4f6427e9c69d2a2dcd7ef2d4e7107f24acf51a00fec8528d70ef51be92288814030cfabf8ffb097693a848265397  conky-1.11.6.tar.lz
"
