# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=feh
pkgver=3.10.3
pkgrel=0
pkgdesc="Fast, lightweight image viewer which uses imlib2"
url="https://feh.finalrewind.org"
arch="all"
license="MIT-feh"
subpackages="$pkgname-doc"
makedepends="
	curl-dev
	file-dev
	imlib2-dev
	libjpeg-turbo-dev
	libpng-dev
	libxinerama-dev
	libxt-dev
	"
checkdepends="perl-utils perl-test-command"
source="https://feh.finalrewind.org/feh-$pkgver.tar.bz2"

build() {
	make magic=1 PREFIX=/usr
}

check() {
	make test
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" \
		bin_dir="$pkgdir"/usr/bin \
		man_dir="$pkgdir"/usr/share/man \
		doc_dir="$pkgdir"/usr/share/doc/$pkgname \
		example_dir="$pkgdir"/usr/share/doc/$pkgname/examples \
		install
}

sha512sums="
60f29d463486eca9308037648a1b91b093051878aa2a8671166fd685ac05c217cd46ad2c7df2fde09b5f1d6cd8b3ee2b8f32fbbf6d3b2e4abc4c50b36f237977  feh-3.10.3.tar.bz2
"
