#Makefile: Wheel, release and executable zipfile creation
wheel: youtube-dl.whl

youtube-dl.whl: youtube_dl/*.py youtube_dl/*/*.py
	python setup.py bdist_wheel
	mv -f dist/* youtube-dl.whl
	
pub: BINFILES/youtube-dl.deb BINFILES/youtube-dl.tar.gz youtube-dl.py
	mv BINFILES/youtube-dl.tar.gz BINFILES/youtube_dl-`devscripts/version.sh -r`.tar.gz
	mv BINFILES/youtube-dl.deb BINFILES/youtube_dl-`devscripts/version.sh -r`.deb
	cp youtube-dl.py BINFILES/

youtube-dl.py: youtube_dl/*.py youtube_dl/*/*.py
	./zipEXE.sh
	echo '#!$(PYTHON)' > youtube-dl.py
	echo -n '#' >> youtube-dl.py
	sha256sum youtube-dl.zip >> youtube-dl.py
	cat youtube-dl.zip >> youtube-dl.py
	rm youtube-dl.zip
	chmod a+x youtube-dl.py