Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 SHELL := sh -e
4
5 VERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | rev | cut -d- -f2- | rev | sed -e 's|~|.|g')
6
7 %:
8 dh ${@} --buildsystem=pybuild --with=python3
9
10 execute_after_dh_auto_clean:
11 rm -f RELEASE-VERSION
12
13 # help pybuild
14 for ITEM in $$(find . -type d -name "*.egg-info" -or -type f -name "*.egg"); \
15 do \
16 rm -rf "$${ITEM}"; \
17 done
18
19 # remove generated files
20 rm -rf deluge/plugins/*/build
21 rm -f deluge/ui/web/js/deluge-all-debug.js
22 rm -f deluge/ui/web/js/extjs/ext-extensions-debug.js
23 rm -f deluge/ui/web/js/gettext.js
24
25 for file in $$(find . -type f -name "*.in"); \
26 do \
27 rm -f "$$(dirname "$${file}")"/"$$(basename "$${file}" .in)"; \
28 done
29
30 execute_before_dh_auto_build:
31 echo "$(VERSION)" > RELEASE-VERSION
32
33 override_dh_auto_test:
34 # disabled
35
36 execute_after_dh_auto_install:
37 # unpacking plugins
38 cd debian/tmp/usr/lib/python*/*-packages/deluge/plugins/; \
39 for EGG in *.egg; \
40 do \
41 mkdir -p $${EGG%-py?.*}.egg; \
42 unzip $${EGG} -d $${EGG%-py?.*}.egg; \
43 rm -f $${EGG}; \
44 done
45
46 # removing unused files
47 find debian/tmp -type d -name '__pycache__' | xargs rm -rf
48 rm -rf debian/tmp/usr/lib/python*/dist-packages/deluge/tests