#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS+=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed

export CFLAGS LDFLAGS

%:
	dh $@ 

override_dh_auto_install:
	# why does gimptool-2.0 ignore my DESTDIR?
	# DESTDIR=debian/gimplensfun/ gimptool-2.0 --install-admin-bin gimplensfun
	install -m 755 -D gimplensfun debian/gimp-lensfun/$$(gimptool-2.0 --gimpplugindir)/plug-ins/gimplensfun
