-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (29 loc) · 968 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
PYTHON ?= /usr/bin/env python
localsymlink:
ln -sf ${ROOT_DIR}/dvd_remuxer/__main__.py ~/.bin/dvd-remuxer
install: dvd-remuxer
install -d $(DESTDIR)$(BINDIR)
install -m 755 dvd-remuxer $(DESTDIR)$(BINDIR)
dvd-remuxer: dvd_remuxer/*.py
mkdir -p zip
for d in dvd_remuxer ; do \
mkdir -p zip/$$d ;\
cp -pPR $$d/*.py zip/$$d/ ;\
done
touch -t 200001010101 zip/dvd_remuxer/*.py
mv zip/dvd_remuxer/__main__.py zip/
cd zip ; zip -q ../dvd-remuxer dvd_remuxer/*.py __main__.py
rm -rf zip
echo '#!$(PYTHON)' > dvd-remuxer
cat dvd-remuxer.zip >> dvd-remuxer
rm dvd-remuxer.zip
chmod a+x dvd-remuxer
clean:
rm -f dvd-remuxer *.vob *.idx *.sub *_chapters.txt *.mkv
find . -name "*.pyc" -delete
find . -name "*.class" -delete
tests:
coverage run --rcfile ./pyproject.toml -m unittest && coverage report && coverage xml && rm ./.coverage