1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00
svtplay-dl/lib/Makefile
Olof Johansson 87ae56caca Make build reproducible
This change makes zip drop any additional metadata about the file, like access
time. Without this change, you'd get different md5sums every time you build
svtplay-dl --- even though you use the exact same sources.

Credit to the people behind http://reproducible.debian.net/ for inspiration! :)
2015-02-13 23:33:52 +01:00

28 lines
679 B
Makefile

PYLINT_OPTS = --report=no -d I -d C -d R -d W0511
all: svtplay-dl
clean:
find . -name '*.pyc' -exec rm {} \;
rm -f svtplay-dl
pylint:
pylint $(PYLINT_OPTS) svtplay_dl
export PACKAGES = svtplay_dl \
svtplay_dl.fetcher \
svtplay_dl.utils \
svtplay_dl.service \
svtplay_dl.subtitle
export PYFILES = $(addsuffix /*.py,$(subst .,/,$(PACKAGES)))
PYTHON ?= /usr/bin/env python
svtplay-dl: $(PYFILES)
zip -X --quiet svtplay-dl $(PYFILES)
zip -X --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