# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=nautilus-image-converter
pkgver=0.3.0+31+g23441ed
pkgrel=3
pkgdesc="Nautilus extension to rotate/resize image files"
arch=('x86_64')
url="https://git.gnome.org/browse/nautilus-image-converter"
license=('GPL')
depends=('imagemagick' 'nautilus')
makedepends=('git' 'gnome-common')
_commit=23441ed6d74b4eba68333c802890cb396721a6d6  # master
source=("git+https://gitlab.gnome.org/Archive/nautilus-image-converter#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
	cd $pkgname
	git describe --tags | sed 's/^NAUTILUS_IMAGE_CONVERTER_//;s/_/./g;s/-/+/g'
}

prepare() {
	cd $pkgname
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	cd $pkgname
	./configure --prefix=/usr
	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
	make
}

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