#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DOC_DIR=$(CURDIR)/debian/libzvbi-doc/usr/share/doc/libzvbi-doc/html

%:
	dh $@ --parallel --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-proxy

override_dh_install:
	dh_install
	# Using rdfind and symlinks to transform duplicated files in softlinks
	rdfind -makesymlinks true -makeresultsfile false $(DOC_DIR)
	symlinks -cr $(DOC_DIR)
	# Removing an embedded library
	rm -f $(DOC_DIR)/jquery.js
	cd $(DOC_DIR) && ln -s /usr/share/javascript/jquery/jquery.js

override_dh_installdocs:
	dh_installdocs -A README TODO NEWS AUTHORS
