# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer:
pkgname=libfm
pkgver=1.3.1
pkgrel=1
pkgdesc="Library for file management"
url="https://wiki.lxde.org/en/PCManFM"
arch="all"
license="GPL-2.0+"
depends=""
depends_dev="libfm-extra-dev"
makedepends="dbus-glib-dev glib-dev gtk+2.0-dev intltool libexif-dev
	libfm-extra-dev menu-cache-dev udisks2-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://downloads.sourceforge.net/pcmanfm/$pkgname-$pkgver.tar.xz
	without-extra.patch
	"

build() {
	mv data/libfm.conf data/libfm.conf.sample
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-udisks \
		--with-gnu-ld
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	# this symlink breaks installation with -extra-dev,
	# and extra is always required anyway
	rm "$pkgdir"/usr/include/libfm
}

sha512sums="f385cf7bf2f4800c11dd6474cd20009cbe1208f1d08570b61954ea8bd84c56cc49880cbf84d4b2aa4b91eb6929d017ebc427649391059b786d7e6fc4535e4f14  libfm-1.3.1.tar.xz
776559307e796309a0a68173292d4ce91c3a241a0e8310a04a96856949677f2f7f8527ae463e4438d635ebe93676dda923a2deed5b76aba007b00093e3a5a109  without-extra.patch"