2013-03-23 16:30:19 +01:00
|
|
|
all: svtplay-dl
|
|
|
|
|
|
|
|
clean:
|
2013-05-15 18:38:50 +02:00
|
|
|
find -name '*.pyc' -exec rm {} \;
|
2013-03-23 16:30:19 +01:00
|
|
|
rm -f svtplay-dl
|
|
|
|
|
2013-04-21 14:08:41 +02:00
|
|
|
export PACKAGES = svtplay_dl \
|
|
|
|
svtplay_dl.fetcher \
|
|
|
|
svtplay_dl.utils \
|
|
|
|
svtplay_dl.service
|
|
|
|
export PYFILES = $(addsuffix /*.py,$(subst .,/,$(PACKAGES)))
|
|
|
|
|
2013-03-23 16:30:19 +01:00
|
|
|
PREFIX=/usr/local
|
|
|
|
BINDIR=$(PREFIX)/bin
|
|
|
|
PYTHON=/usr/bin/env python
|
|
|
|
|
|
|
|
install: svtplay-dl
|
|
|
|
install -d $(DESTDIR)$(BINDIR)
|
|
|
|
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
|
|
|
|
|
2013-04-21 14:08:41 +02:00
|
|
|
svtplay-dl: $(PYFILES)
|
|
|
|
zip --quiet svtplay-dl $(PYFILES)
|
2013-03-23 16:30:19 +01:00
|
|
|
zip --quiet --junk-paths svtplay-dl svtplay_dl/__main__.py
|
|
|
|
echo '#!$(PYTHON)' > svtplay-dl
|
|
|
|
cat svtplay-dl.zip >> svtplay-dl
|
|
|
|
rm svtplay-dl.zip
|
|
|
|
chmod a+x svtplay-dl
|