# Maintainer:
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>

pkgname=libfm
pkgver=1.2.5
pkgrel=1
pkgdesc="Library for file management"
url="https://wiki.lxde.org/en/PCManFM"
arch="all"
license="GPL-2.0+"
makedepends="gtk+2.0-dev menu-cache-dev udisks-dev intltool dbus-glib-dev
             libexif-dev"
options="libtool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="http://downloads.sourceforge.net/pcmanfm/$pkgname-$pkgver.tar.xz"

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-udisks \
		--with-gnu-ld
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	rm -rf "$pkgdir"/usr/include/libfm
	mv "$pkgdir"/usr/include/libfm-1.0/ "$pkgdir"/usr/include/libfm
}

md5sums="a1ba9ae5e920f38b647dd511edd6c807  libfm-1.2.5.tar.xz"
sha256sums="c706bb1020cf5f2d6f5a9226f692ce1985947134dcf2bde64278bd0420779b5a  libfm-1.2.5.tar.xz"
sha512sums="14630639dab9289f1a4c30eaf0f1b628ff0d492c095ce31c15e1dcacfd12d5a91551fecb67bd6d949fbc0c3f16850352b699e86dd200cda92da45539b7e87074  libfm-1.2.5.tar.xz"
