# Maintainer: PktSurf <smlinux@pktsurf.in>
app=xscreensaver
version=6.06
build=1sml
homepage="https://www.jwz.org/xscreensaver/"
download="https://www.jwz.org/xscreensaver/xscreensaver-$version.tar.gz"
desc="Screensaver for Xorg"
requires="gtk2 gdk-pixbuf"

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

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

build() {
  ./configure \
    --prefix=/ \
    --with-login-manager \
    --with-gtk \
    --with-gl \
    --without-gle \
    --with-pixbuf \
    --with-jpeg \
    --without-pam \
    --without-kerberos \
    --without-elogind \
    --without-systemd \
    --with-shadow \
    --with-app-defaults="/share/X11/app-defaults"

  make
  make install install_prefix="$pkg" 

  cp $srcdir/LICENSE $pkgdocs/
  
  mkfinalpkg
}

sha512sums="
e8e01975910ad9eaf5e1ad5f5170afe01284af84aa123ced376ffbea761e81f57fd0877a1fea173f3b0bfb70c846171a8045d296deccbd9d20db9f481899b515  xscreensaver-6.06.tar.lz
"