]>
Commit | Line | Data |
---|---|---|
a9d2f7e8 | 1 | all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion |
4618f3da | 2 | |
85f76ac9 | 3 | clean: |
d19bb9c0 | 4 | rm -rf youtube-dl.1.temp.md youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz |
434eb6f2 PH |
5 | |
6 | cleanall: clean | |
7 | rm -f youtube-dl youtube-dl.exe | |
4618f3da | 8 | |
0e841bdc | 9 | PREFIX=/usr/local |
e79e8b7d TM |
10 | BINDIR=$(PREFIX)/bin |
11 | MANDIR=$(PREFIX)/man | |
271d3fbd | 12 | PYTHON=/usr/bin/env python |
e79e8b7d | 13 | |
5738240e | 14 | # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local |
15 | ifeq ($(PREFIX),/usr) | |
76965512 | 16 | SYSCONFDIR=/etc |
5738240e | 17 | else |
76965512 JMF |
18 | ifeq ($(PREFIX),/usr/local) |
19 | SYSCONFDIR=/etc | |
20 | else | |
21 | SYSCONFDIR=$(PREFIX)/etc | |
22 | endif | |
5738240e | 23 | endif |
24 | ||
dce10884 | 25 | install: youtube-dl youtube-dl.1 youtube-dl.bash-completion |
e79e8b7d TM |
26 | install -d $(DESTDIR)$(BINDIR) |
27 | install -m 755 youtube-dl $(DESTDIR)$(BINDIR) | |
28 | install -d $(DESTDIR)$(MANDIR)/man1 | |
29 | install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1 | |
30 | install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d | |
31 | install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl | |
dce10884 | 32 | |
a7b5c8d6 | 33 | test: |
fedb6816 FV |
34 | #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test |
35 | nosetests --verbose test | |
a7b5c8d6 | 36 | |
039dc61b PH |
37 | tar: youtube-dl.tar.gz |
38 | ||
434eb6f2 PH |
39 | .PHONY: all clean install test tar bash-completion pypi-files |
40 | ||
41 | pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 | |
dce10884 | 42 | |
633a50cf PH |
43 | youtube-dl: youtube_dl/*.py youtube_dl/*/*.py |
44 | zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py | |
20ba0426 | 45 | zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py |
c67598c3 | 46 | echo '#!$(PYTHON)' > youtube-dl |
dce10884 FV |
47 | cat youtube-dl.zip >> youtube-dl |
48 | rm youtube-dl.zip | |
85f76ac9 | 49 | chmod a+x youtube-dl |
dce10884 | 50 | |
633a50cf | 51 | README.md: youtube_dl/*.py youtube_dl/*/*.py |
4bb028f4 | 52 | COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py |
4618f3da | 53 | |
cc51a7d4 | 54 | README.txt: README.md |
4bb028f4 | 55 | pandoc -f markdown -t plain README.md -o README.txt |
cc51a7d4 | 56 | |
dce10884 | 57 | youtube-dl.1: README.md |
d19bb9c0 | 58 | python devscripts/prepare_manpage.py >youtube-dl.1.temp.md |
dffcc2ea | 59 | pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1 |
d19bb9c0 | 60 | rm -f youtube-dl.1.temp.md |
cfcec693 | 61 | |
633a50cf | 62 | youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in |
4c1d273e | 63 | python devscripts/bash-completion.py |
23109d6a | 64 | |
434eb6f2 PH |
65 | bash-completion: youtube-dl.bash-completion |
66 | ||
6dd34719 | 67 | youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion |
814eed0e | 68 | @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \ |
039dc61b PH |
69 | --exclude '*.DS_Store' \ |
70 | --exclude '*.kate-swp' \ | |
71 | --exclude '*.pyc' \ | |
72 | --exclude '*.pyo' \ | |
73 | --exclude '*~' \ | |
74 | --exclude '__pycache' \ | |
814eed0e | 75 | --exclude '.git' \ |
76965512 | 76 | --exclude 'testdata' \ |
2c8a4ba6 | 77 | --exclude 'docs/_build' \ |
814eed0e | 78 | -- \ |
2c8a4ba6 | 79 | bin devscripts test youtube_dl docs \ |
aae74e38 | 80 | LICENSE README.md README.txt \ |
6dd34719 | 81 | Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion setup.py \ |
814eed0e | 82 | youtube-dl |