#!/usr/bin/make -f

TMP = $(CURDIR)/debian/libmp3-tag-perl

%:
	dh $@

override_dh_clean:
	# clean up after tests
	-rm -f  test2.mp3 test12.mp3 t12.mp3 test13.mp3 test2.inf audio07.mp3 audio_07.mp3 audio08.mp3 xxxtest12.mp3 t_gif.mp3 t_gif1.mp3 t_gif2.mp3 test14.mp3 test14.MP3 test15.mp7
	dh_clean

override_dh_compress:
	dh_compress -Xexamples

override_dh_fixperms:
	dh_fixperms
	chmod 644 $(TMP)/usr/share/perl5/MP3/Tag/ID3v2_Data.pod
	for i in `find $(TMP)/usr/share/doc/libmp3-tag-perl/examples -type f` ; \
	do \
	    if file -b "$$i" | grep -q executable ;\
	    then \
	        chmod 755 "$$i"; \
	    else \
	        chmod 644 "$$i"; \
	    fi ;\
	done
	chmod 644 $(TMP)/usr/share/perl5/Normalize/Text/Music_Fields/*
