Merge remote-tracking branch 'jefftimesten/master'
[youtube-dl] / Makefile
index b49af6a7a2742ae1e7fafa34283757a7f9285b39..b47433573a74eac3eae4171d66f6144e1d83b2a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
 
 clean:
-       rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/
+       rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz
 
 PREFIX=/usr/local
 BINDIR=$(PREFIX)/bin
@@ -20,7 +20,9 @@ test:
        #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
        nosetests --verbose test
 
-.PHONY: all clean install test
+tar: youtube-dl.tar.gz
+
+.PHONY: all clean install test tar
 
 youtube-dl: youtube_dl/*.py
        zip --quiet youtube-dl youtube_dl/*.py
@@ -42,8 +44,17 @@ youtube-dl.1: README.md
 youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.in
        python devscripts/bash-completion.py
 
-youtube-dl.tar.gz: all
-       tar -czf youtube-dl.tar.gz -s "|^./|./youtube-dl/|" --exclude="updates_key.pem" \
-               --exclude="*.pyc" --exclude="*.pyo" --exclude="*~" --exclude="youtube-dl.exe" \
-               --exclude="wine-py2exe/" --exclude="py2exe.log" --exclude="*.kate-swp" \
-               --exclude="build/" --exclude="dist/" --exclude="MANIFEST" --exclude=".git/" .
+youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
+       @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \
+               --exclude '*.DS_Store' \
+               --exclude '*.kate-swp' \
+               --exclude '*.pyc' \
+               --exclude '*.pyo' \
+               --exclude '*~' \
+               --exclude '__pycache' \
+               --exclude '.git' \
+               -- \
+               bin devscripts test youtube_dl \
+               CHANGELOG LICENSE README.md README.txt \
+               Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion setup.py \
+               youtube-dl