You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.0 KiB

12 years ago
12 years ago
  1. all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
  2. clean:
  3. rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/
  4. PREFIX=/usr/local
  5. BINDIR=$(PREFIX)/bin
  6. MANDIR=$(PREFIX)/man
  7. SYSCONFDIR=/etc
  8. install: youtube-dl youtube-dl.1 youtube-dl.bash-completion
  9. install -d $(DESTDIR)$(BINDIR)
  10. install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
  11. install -d $(DESTDIR)$(MANDIR)/man1
  12. install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
  13. install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
  14. install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
  15. test:
  16. #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
  17. nosetests --verbose test
  18. tar: youtube-dl.tar.gz
  19. .PHONY: all clean install test tar
  20. youtube-dl: youtube_dl/*.py
  21. zip --quiet youtube-dl youtube_dl/*.py
  22. zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
  23. echo '#!/usr/bin/env python' > youtube-dl
  24. cat youtube-dl.zip >> youtube-dl
  25. rm youtube-dl.zip
  26. chmod a+x youtube-dl
  27. README.md: youtube_dl/*.py
  28. COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py
  29. README.txt: README.md
  30. pandoc -f markdown -t plain README.md -o README.txt
  31. youtube-dl.1: README.md
  32. pandoc -s -f markdown -t man README.md -o youtube-dl.1
  33. youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.in
  34. python devscripts/bash-completion.py
  35. youtube-dl.tar.gz: all
  36. @tar -czf youtube-dl.tar.gz --transform "s|^./|./youtube-dl/|" --owner 0 --group 0 \
  37. --exclude-vcs \
  38. --exclude '*.DS_Store' \
  39. --exclude '*.kate-swp' \
  40. --exclude '*.pyc' \
  41. --exclude '*.pyo' \
  42. --exclude '*~' \
  43. --exclude '__pycache' \
  44. --exclude 'build' \
  45. --exclude 'cover' \
  46. --exclude '.coverage' \
  47. --exclude 'dist' \
  48. --exclude 'MANIFEST' \
  49. --exclude 'py2exe.log' \
  50. --exclude 'updates_key.pem' \
  51. --exclude 'wine-py2exe' \
  52. --exclude 'youtube-dl.exe' \
  53. --exclude 'youtube-dl.tar.gz' \
  54. -- .