#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
#  # Copyright © 2003-2006 Frederik Schüler <fs@debian.org>

#export DH_VERBOSE=1

include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/rules/simple-patchsys.mk

DEB_FIXPERMS_EXCLUDE := usr/share/phpsysinfo

# chown everything to nobody:nogroup to make suphp happy
common-binary-post-install-indep::
	find debian/phpsysinfo/usr/share/phpsysinfo/ -type d -empty -delete
	find debian/phpsysinfo/usr/share/phpsysinfo/ -type d -exec chmod 0755 {} \;
	find debian/phpsysinfo/usr/share/phpsysinfo/ -type f -exec chmod 0644 {} \;
	find debian/phpsysinfo/usr/share/phpsysinfo/ -type f -exec chown nobody:nogroup {} \;
	cp config.php.new debian/phpsysinfo/etc/phpsysinfo/config.php
	chown nobody:nogroup debian/phpsysinfo/etc/phpsysinfo/config.php

