#! /usr/bin/make -f
## debian/rules file for syslog-ng Incubator
## (C) 2013, 2014 Gergely Nagy <algernon@madhouse-project.org>
##
## Released under the GPLv2+, see /usr/share/common-licenses/GPL-2 on
## Debian systems.

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-rpath=/usr/lib/syslog-ng
export DH_OPTIONS += -O-Bdebian/build-tree -O-D${SRCDIR}

override_dh_auto_configure:
	install -d debian/build-tree
	dh_auto_configure -- \
		--datadir=/usr/share/syslog-ng

override_dh_install:
	find debian/tmp -name '*.a' -print -delete
	find debian/tmp -name '*.la' -print -delete
	dh_install

override_dh_missing:
	dh_missing --fail-missing -Xlogmongource

# dh_makeshlibs wants to be clever and treat plugins as shared libs.
# Slap it in the face, and tell it not to.
override_dh_makeshlibs:
	dh_makeshlibs -n -Xusr/lib/syslog-ng/*

%:
	dh $@
