Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. all: compile exe readme man-page update-latest
  2. update-latest:
  3. ./youtube-dl --version > LATEST_VERSION
  4. readme:
  5. @options=$$(COLUMNS=80 ./youtube-dl --help | sed -e '1,/.*General Options.*/ d' -e 's/^\W\{2\}\(\w\)/## \1/') && \
  6. header=$$(sed -e '/.*# OPTIONS/,$$ d' README.md) && \
  7. footer=$$(sed -e '1,/.*# FAQ/ d' README.md) && \
  8. echo "$${header}" > README.md && \
  9. echo >> README.md && \
  10. echo '# OPTIONS' >> README.md && \
  11. echo "$${options}" >> README.md&& \
  12. echo >> README.md && \
  13. echo '# FAQ' >> README.md && \
  14. echo "$${footer}" >> README.md
  15. man-page:
  16. pandoc -s -w man README.md -o youtube-dl.1
  17. compile:
  18. zip --quiet --junk-paths youtube-dl youtube_dl/*.py
  19. echo '#!/usr/bin/env python' > youtube-dl
  20. cat youtube-dl.zip >> youtube-dl
  21. rm youtube-dl.zip
  22. exe:
  23. bash devscripts/wine-py2exe.sh build_exe.py
  24. install:
  25. install -m 755 --owner root --group root youtube-dl /usr/local/bin/
  26. install -m 644 --owner root --group root youtube-dl.1 /usr/local/man/man1
  27. .PHONY: all update-latest readme man-page compile exe install