#!/usr/bin/make -f
  
include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/class/makefile.mk

# Add here any variable or target overrides you need.

DEB_FIXPERMS_EXCLUDE := usr/share/snpservices var/lib/snpservices
DEB_DH_LINK_ARGS := /etc/snpservices/config.php /usr/share/snpservices/common/config.php /var/lib/snpservices/data/mrtg.cfg /usr/share/snpservices/data/mrtg.cfg /var/lib/snpservices/tmp /usr/share/snpservices/tmp

# chown everything to nobody:nogroup to make suphp happy
common-binary-post-install-indep::
	find debian/snpservices/usr/share/snpservices/ -type d -exec chmod 0755 {} \;
	find debian/snpservices/usr/share/snpservices/ -type f -exec chmod 0644 {} \;
	find debian/snpservices/usr/share/snpservices/ -type f -exec chown nobody:nogroup {} \;
	find debian/snpservices/usr/share/snpservices/ -name *.sh -exec chmod 0744 {} \;
	find debian/snpservices/usr/share/snpservices/ -name *.pl -exec chmod 0744 {} \;
# Not nice :(
	find debian/snpservices/var/lib/snpservices/ -type d -exec chmod 0755 {} \;
	find debian/snpservices/var/lib/snpservices/ -type d -exec chown www-data:www-data {} \;
