#!/usr/bin/make -f

export DEB_BUILD_HARDENING=1

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

override_dh_install:
	strip --remove-section=.comment --remove-section=.note --strip-unneeded \
		debian/tmp/usr/lib/*/glusterfs/*/xlator/debug/trace.so
	strip --remove-section=.comment --remove-section=.note --strip-unneeded \
		debian/tmp/usr/lib/*/glusterfs/*/xlator/debug/error-gen.so
	strip --remove-section=.comment --remove-section=.note --strip-unneeded \
		debian/tmp/usr/lib/*/glusterfs/*/xlator/debug/io-stats.so
	find debian/tmp/usr/lib -type f -name \*.la -exec sed 's/^dependency_libs/#dependency_libs/g' -i {} \;
	dh_install

override_dh_installinit:
	dh_installinit -pglusterfs-client --no-start --name mounting-glusterfs
	dh_installinit

override_dh_strip:
	dh_strip --dbg-package=glusterfs-dbg
