#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=feh
pkgver=3.10
pkgrel=01
pkgdesc='Fast and light imlib2-based image viewer'
url='https://feh.finalrewind.org/'
#depends=('imlib2' 'curl' 'libxinerama' 'libexif')
depends=('curl' 'file' 'imlib2' 'libexif' 'libxinerama')
optdepends=('imagemagick: support more file formats'
            'jpegexiforient: set exif rotation tag')
makedepends=('libxt')
#options=('debug')  ###   uncomment this line to have the debug pkg produced
source=(${url}$pkgname-$pkgver.tar.bz2{,.asc})

#prepare() {
#	cd "${srcdir}/${pkgname}-${pkgver}"
#	patch -Np1 < ../0001-libmagic.patch
#}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make PREFIX=/usr \
		exif=1 \
		help=1 \
		inotify=1 \
		magic=1 \
		stat64=1
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make PREFIX=/usr DESTDIR="${pkgdir}" install
	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=('custom:MIT')

validpgpkeys=(781BB7071C6BF648EAEB08A1100D5BFB5166E005  # Daniel Friesel <derf@finalrewind.org> 
              64FE6EC055560F9EF13A304419E6E524EBB177BA) # Derf Null <derf@ccc.de>

sha256sums=(1d71d1f6dcfe9ffee5e2766969a11978f7eb4fac7d7ae556f104c11f9c57cc98  # feh-3.9.1.tar.bz2
	9f65c43763c260fe6cfac5a6a879e3d942bc3f8a523291044ea50833141641bc) # feh-3.10.tar.bz2.asc

##  5e989bab550c5cc5fe1d7b20490f36f5214391f7938f11e5a413a0a42f7f40a8  feh-3.10-01-x86_64.pkg.tar.lz
