#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

# Don't compress the examples.
DEB_COMPRESS_EXCLUDE_DEFAULT := .php

# In order to regenerate 'debian/control' :
#   DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
# Then check manually if everything's ok

binary-install/php-getid3::
	mv $(CURDIR)/debian/php-getid3/usr/share/doc/php-getid3/changelog.txt $(CURDIR)/debian/php-getid3/usr/share/doc/php-getid3/changelog 
	find $(CURDIR)/debian/php-getid3/usr/share/doc/php-getid3/examples -maxdepth 1 -mindepth 1 | while read i; do \
		sed -i -e s#../getid3/getid3.php#/usr/share/php/getid3/getid3.php# "$$i"; \
	done
	rm -rf "$(CURDIR)/debian/php-getid3/usr/share/php/getid3/!delete any module you don't like, but check dependencies.txt"
