]>
Commit | Line | Data |
---|---|---|
1 | all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion | |
2 | ||
3 | clean: | |
4 | 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 | |
5 | ||
6 | PREFIX=/usr/local | |
7 | BINDIR=$(PREFIX)/bin | |
8 | MANDIR=$(PREFIX)/man | |
9 | SYSCONFDIR=/etc | |
10 | ||
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 | ||
19 | test: | |
20 | #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test | |
21 | nosetests --verbose test | |
22 | ||
23 | tar: youtube-dl.tar.gz | |
24 | ||
25 | .PHONY: all clean install test tar | |
26 | ||
27 | youtube-dl: youtube_dl/*.py | |
28 | zip --quiet youtube-dl youtube_dl/*.py | |
29 | zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py | |
30 | echo '#!/usr/bin/env python' > youtube-dl | |
31 | cat youtube-dl.zip >> youtube-dl | |
32 | rm youtube-dl.zip | |
33 | chmod a+x youtube-dl | |
34 | ||
35 | README.md: youtube_dl/*.py | |
36 | COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py | |
37 | ||
38 | README.txt: README.md | |
39 | pandoc -f markdown -t plain README.md -o README.txt | |
40 | ||
41 | youtube-dl.1: README.md | |
42 | pandoc -s -f markdown -t man README.md -o youtube-dl.1 | |
43 | ||
44 | youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.in | |
45 | python devscripts/bash-completion.py | |
46 | ||
47 | youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion | |
48 | @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \ | |
49 | --exclude '*.DS_Store' \ | |
50 | --exclude '*.kate-swp' \ | |
51 | --exclude '*.pyc' \ | |
52 | --exclude '*.pyo' \ | |
53 | --exclude '*~' \ | |
54 | --exclude '__pycache' \ | |
55 | --exclude '.git' \ | |
56 | -- \ | |
57 | bin devscripts test youtube_dl \ | |
58 | CHANGELOG LICENSE README.md README.txt \ | |
59 | Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion setup.py \ | |
60 | youtube-dl |