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

DEB_PYTHON_SYSTEM=pysupport

include /usr/share/cdbs/1/class/python-distutils.mk

DEB_PYTHON_SETUP_CMD := setup.py

binary-predeb/screenlets-pack-all::
	find debian/screenlets-pack-all/usr/share/screenlets/ -name "*.svg" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-all/usr/share/screenlets/ -name "*.png" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-all/usr/share/screenlets/ -name "*.xml" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-all/usr/share/screenlets/ -name "*.conf" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-all/usr/share/screenlets/ -name "TODO" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-all/usr -name COPYING -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name README -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name AUTHORS -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name CHANGELOG -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name COPYING.ICONS -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name licence -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name .gitignore -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name LICENSE.txt -type f -exec rm -f {} \;
	find debian/screenlets-pack-all/usr -name ReadMe.txt -type f -exec rm -f {} \;
	chmod 755 debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/Lyrics/gui/afv_widgets
	chmod 755 debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/Lyrics/gui/ls_widget
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/UI/Theme.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Audacious.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/mpd.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/themes/Broken_Glass/cover_manip.sh
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/themes/Border_Fade-200px/cover_manip.sh
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/fetcher/np_fetcher_discogs.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/greek
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Amarok_1.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/dogs_cz
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Amarok_2.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/cats_cz
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Exaile.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/NowPlayingScreenlet.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/DecibelAudioPlayer.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Abraca.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/sk
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Songbird.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/fetcher/np_fetcher_google.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/qmmp.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/XMMS2.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Muine.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/QuodLibet.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Amarok_1_no_pydcop.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/gXMMS2.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Juk.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/themes/Border_Fade-400px/cover_manip.sh
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/themes/default/cover_manip.sh
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/FlipClock/Source/mootools.js
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/eng
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/GenericPlayer.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/FlipClock/Source/index.html
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/InfoPanel/holidays/cz
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Jajuk.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Mpris.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Listen.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Rhythmbox.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/FlipClock/Source/animate.js
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Esperanza.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Banshee.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/FlipClock/Source/style.css
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/fetcher/np_fetcher_amazon.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/LXMusic.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/Players/Mpd.py
	chmod 644  debian/screenlets-pack-all/usr/share/screenlets/screenlets-pack-all/NowPlaying/fetcher/np_fetcher_lastfm.py



binary-predeb/screenlets-pack-basic::
	find debian/screenlets-pack-basic/usr/share/screenlets/ -name "*.svg" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-basic/usr/share/screenlets/ -name "*.png" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-basic/usr/share/screenlets/ -name "*.xml" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-basic/usr/share/screenlets/ -name "*.conf" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-basic/usr/share/screenlets/ -name "TODO" -type f -exec chmod 644 {} \;
	find debian/screenlets-pack-basic/usr -name COPYING -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name README -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name AUTHORS -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name CHANGELOG -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name COPYING.ICONS -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name licence -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name .gitignore -type f -exec rm -f {} \;
	find debian/screenlets-pack-basic/usr -name LICENSE.txt -type f -exec rm -f {} \;
	chmod 755 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/Lyrics/gui/afv_widgets
	chmod 755 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/Lyrics/gui/ls_widget
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Audacious.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/UI/Theme.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/mpd.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/themes/Border_Fade-400px/cover_manip.sh
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/NowPlayingScreenlet.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/fetcher/np_fetcher_amazon.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Songbird.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/themes/default/cover_manip.sh
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Jajuk.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Abraca.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/LXMusic.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/fetcher/np_fetcher_discogs.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/GenericPlayer.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Juk.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Mpris.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/fetcher/np_fetcher_google.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Banshee.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Amarok_1_no_pydcop.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/themes/Border_Fade-200px/cover_manip.sh
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/XMMS2.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/fetcher/np_fetcher_lastfm.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Muine.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/qmmp.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/DecibelAudioPlayer.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Rhythmbox.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Listen.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Amarok_1.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/QuodLibet.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Amarok_2.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Esperanza.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/themes/Broken_Glass/cover_manip.sh
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Exaile.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/gXMMS2.py
	chmod 644 debian/screenlets-pack-basic/usr/share/screenlets/screenlets-pack-basic/NowPlaying/Players/Mpd.py

clean::
	rm -fR build/
