#Maintainer: Didier Spaier <didier~at~slint~dot~fr>
# Modified for Slint by Didier Spaier <didier~at~slint~dot~fr> 

pkgname=mate-user-guide
pkgver=1.26.2
pkgrel=1slint
source=('http://pub.mate-desktop.org/releases/1.26/mate-user-guide-1.26.2.tar.xz')
options=('noautodotnew' 'nosrcpack')
docs=("authors" "copying" "news" "readme" "changelog")
url='https://github.com/mate-desktop/mate-user-guide'
slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"slint-mate-user-guide (Mate user guide)"
"This package also builds a local website of the Mate user guide, that"
"can be accessed with the command mate-user-guide."
)
arch=noarch
build() {
	target=$startdir/pkg/usr/doc/${pkgname}-${pkgver}
	mkdir -p $target
	cd $startdir/src/${pkgname}-${pkgver}
	./configure \
	--prefix=/usr \
	--libdir=/usr/lib${LIBDIRSUFFIX} \
	--localstatedir=/var \
	--sysconfdir=/etc
	make || return 1
	make install DESTDIR=$startdir/pkg
#	cd mate-user-guide
#	find -maxdepth 1 -type f -exec rm '{}' ';'
#	for i in $(ls); do
#		if [ -f $i/index.docbook ]; then
#			echo ${i}...
#			mkdir -p $target/$i
#			if [ ! -d $i/figures ]; then
#				rm -f $i/figures
#				mkdir $i/figures
#			fi
#			yelp-build html -i -o $target/$i $i/index.docbook
#			if [ ! "$i" = "C" ]; then
#				(
#				cd $target
#				for j in $(ls C/figures); do
#					if [ ! -r $i/figures/$j ]; then
#						ln C/figures/$j $i/figures/$j
#					fi
#				done
#				)
#			fi
#		fi
#	done
#	mkdir -p $startdir/pkg/usr/bin
#	cp $startdir/mate-user-guide $startdir/pkg/usr/bin/
#	chmod 755 $startdir/pkg/usr/bin/mate-user-guide
#	chown -R root:root $startdir/pkg/
}
