]>
Commit | Line | Data |
---|---|---|
56d1912f | 1 | all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.fish |
4618f3da | 2 | |
85f76ac9 | 3 | clean: |
56d1912f | 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 youtube-dl.fish |
434eb6f2 PH |
5 | |
6 | cleanall: clean | |
7 | rm -f youtube-dl youtube-dl.exe | |
4618f3da | 8 | |
df866e7f | 9 | PREFIX ?= /usr/local |
10 | BINDIR ?= $(PREFIX)/bin | |
11 | MANDIR ?= $(PREFIX)/man | |
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 | |
56d1912f JMF |
32 | install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions |
33 | install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish | |
dce10884 | 34 | |
a7b5c8d6 | 35 | test: |
fedb6816 FV |
36 | #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test |
37 | nosetests --verbose test | |
a7b5c8d6 | 38 | |
039dc61b PH |
39 | tar: youtube-dl.tar.gz |
40 | ||
56d1912f | 41 | .PHONY: all clean install test tar bash-completion pypi-files fish-completion |
434eb6f2 | 42 | |
56d1912f | 43 | pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish |
dce10884 | 44 | |
633a50cf PH |
45 | youtube-dl: youtube_dl/*.py youtube_dl/*/*.py |
46 | zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py | |
20ba0426 | 47 | zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py |
c67598c3 | 48 | echo '#!$(PYTHON)' > youtube-dl |
dce10884 FV |
49 | cat youtube-dl.zip >> youtube-dl |
50 | rm youtube-dl.zip | |
85f76ac9 | 51 | chmod a+x youtube-dl |
dce10884 | 52 | |
633a50cf | 53 | README.md: youtube_dl/*.py youtube_dl/*/*.py |
4bb028f4 | 54 | COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py |
4618f3da | 55 | |
cc51a7d4 | 56 | README.txt: README.md |
4bb028f4 | 57 | pandoc -f markdown -t plain README.md -o README.txt |
cc51a7d4 | 58 | |
dce10884 | 59 | youtube-dl.1: README.md |
d19bb9c0 | 60 | python devscripts/prepare_manpage.py >youtube-dl.1.temp.md |
dffcc2ea | 61 | pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1 |
d19bb9c0 | 62 | rm -f youtube-dl.1.temp.md |
cfcec693 | 63 | |
633a50cf | 64 | youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in |
4c1d273e | 65 | python devscripts/bash-completion.py |
23109d6a | 66 | |
434eb6f2 PH |
67 | bash-completion: youtube-dl.bash-completion |
68 | ||
56d1912f JMF |
69 | youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in |
70 | python devscripts/fish-completion.py | |
71 | ||
72 | fish-completion: youtube-dl.fish | |
73 | ||
74 | youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.fish | |
814eed0e | 75 | @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \ |
039dc61b PH |
76 | --exclude '*.DS_Store' \ |
77 | --exclude '*.kate-swp' \ | |
78 | --exclude '*.pyc' \ | |
79 | --exclude '*.pyo' \ | |
80 | --exclude '*~' \ | |
81 | --exclude '__pycache' \ | |
814eed0e | 82 | --exclude '.git' \ |
76965512 | 83 | --exclude 'testdata' \ |
2c8a4ba6 | 84 | --exclude 'docs/_build' \ |
814eed0e | 85 | -- \ |
2c8a4ba6 | 86 | bin devscripts test youtube_dl docs \ |
aae74e38 | 87 | LICENSE README.md README.txt \ |
56d1912f JMF |
88 | Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion \ |
89 | youtube-dl.fish setup.py \ | |
814eed0e | 90 | youtube-dl |