#Packager: Dimitris Tzemos <dijemos~at~gmail~dot~com>

pkgname=aisleriot
pkgver=3.22.22
pkgrel=1dj
source=("https://gitlab.gnome.org/GNOME/aisleriot/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
docs=("AUTHORS" "COPYING*" "README.md" "TODO")

doinst() {
	# compile schemas
	if [ -x usr/bin/glib-compile-schemas ]; then
		usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
	fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"aisleriot (card games collection)"
"AisleRiot (also known as Solitaire or sol) is a collection of card"
"games which are easy to play with the aid of a mouse."
"Over 80 card games are included."
""
"homepage: https://wiki.gnome.org/Apps/Aisleriot"
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	mkdir build
	cd build

	CFLAGS="$SLKCFLAGS" \
	CXXFLAGS="$SLKCFLAGS" \
	meson .. \
    --buildtype=release \
    --infodir=/usr/info \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --localstatedir=/var \
    --mandir=/usr/man \
    --prefix=/usr \
    --sysconfdir=/etc \
    -Dtheme_kde=false \
    -Dtheme_pysol=true \
    -Dtheme_pysol_path=/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/pysol_cards/ \
    -Dstrip=true
  "${NINJA:=ninja}"
  DESTDIR=$startdir/pkg $NINJA install
  
} 
