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.

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