#Packager: Dimitris Tzemos <dijemos(at)gmail.com>

pkgname=libfm
pkgver=1.3.2
pkgrel=4dj
source=(http://downloads.sourceforge.net/pcmanfm/libfm-$pkgver.tar.gz)
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=https://sourceforge.net/projects/pcmanfm/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"libfm (PCManFM library)"
"LibFM provides file management functions built on top of Glib/GIO,"
"giving a convenient higher-level API."
)


build() {
	cd $SRC/libfm-$pkgver
	./autogen.sh
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-static \
		--enable-udisks \
		--with-gnu-ld \
		--with-gtk=3 \
		--build=$arch-slackware-linux
	make -j $numjobs || return 1
	make install DESTDIR=$PKG
		
	# Temporary fix to FS#32361
	#rm -rf "$PKG"/usr/include/libfm
	#mv "$PKG"/usr/include/libfm-1.0/ "$PKG"/usr/include/libfm
	
	# add handlers for terminal and archiver from LXDE components to the default config
	sed -i -e 's|\[ui\]|terminal=lxterminal -e %s\narchiver=file-roller %s\n\n[ui]|' \
	$PKG/etc/xdg/libfm/libfm.conf

} 
