#Packager:Didier Spaier didieratslintdotfr

pkgname=gnome-disk-utility
pkgver=46.1
pkgrel=1slint
source=("${pkgname}-${pkgver}.tar.xz")
docs=("readme.md" "copying" "authors")
url="https://gitlab.gnome.org/GNOME/gnome-disk-utility"
options=('nosrcpack')

doinst() {
# Update desktop database:
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database /usr/share/applications 1> /dev/null 2> /dev/null
fi
# glib schemas
if [ -x /usr/bin/glib-compile-schemas ]; then
  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1
fi
# Update any existing icon cache files:
if find /usr/share/icons -maxdepth 2 2> /dev/null | grep -q icon-theme.cache ; then
  for theme_dir in /usr/share/icons/* ; do
    if [ -r ${theme_dir}/icon-theme.cache ]; then
      /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null &
    fi
  done
  # This would be a large file and probably shouldn't be there.
  if [ -r /usr/share/icons/icon-theme.cache ]; then
    rm -f /usr/share/icons/icon-theme.cache
  fi
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (applications for dealing with storage devices)"
"This include gnome-disks to view, modify and configure disks and media"
"and gnome-disk-image-mounter to attach and mount disk images."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	 mkdir build
  cd build
  CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS" \
  meson setup \
    --buildtype=release \
    --infodir=/usr/info \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --localstatedir=/var \
    --mandir=/usr/man \
    --prefix=/usr \
    --sysconfdir=/etc \
    -Dlogind=libelogind \
    -Dgsd_plugin=false \
     ..
  ninja
  DESTDIR=$PKG ninja install
cd ..
}
