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

MAINPACKAGE?=jaaa

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

include /usr/share/dpkg/buildtools.mk

export PREFIX=/usr
export PKG_CONF=$(PKG_CONFIG)

%:
	dh $@ --sourcedir=source

override_dh_auto_install:
	dh_auto_install
	install -d $(CURDIR)/debian/jaaa/usr/share/applications/
	install -d $(CURDIR)/debian/jaaa/usr/share/pixmaps/
	install -m 644 $(CURDIR)/debian/*.desktop $(CURDIR)/debian/jaaa/usr/share/applications/
	install -m 644 $(CURDIR)/debian/*.xpm $(CURDIR)/debian/jaaa/usr/share/pixmaps/

override_dh_auto_build:
	dh_auto_build
	docbook-to-man $(CURDIR)/debian/${MAINPACKAGE}.sgml > $(CURDIR)/debian/${MAINPACKAGE}.1

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/debian/${MAINPACKAGE}.1
