blob: 4a5ede655831697898c961e71d66fdd11afc0b15 (
plain) (
blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/usr/bin/make -f
SHELL := sh -e
VERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | rev | cut -d- -f2- | rev | sed -e 's|~|.|g')
%:
dh ${@} --buildsystem=pybuild --with=python3
execute_after_dh_auto_clean:
rm -f RELEASE-VERSION
# help pybuild
for ITEM in $$(find . -type d -name "*.egg-info" -or -type f -name "*.egg"); \
do \
rm -rf "$${ITEM}"; \
done
# remove generated files
rm -rf deluge/plugins/*/build
rm -f deluge/ui/web/js/deluge-all-debug.js
rm -f deluge/ui/web/js/extjs/ext-extensions-debug.js
rm -f deluge/ui/web/js/gettext.js
for file in $$(find . -type f -name "*.in"); \
do \
rm -f "$$(dirname "$${file}")"/"$$(basename "$${file}" .in)"; \
done
execute_before_dh_auto_build:
echo "$(VERSION)" > RELEASE-VERSION
override_dh_auto_test:
# disabled
execute_after_dh_auto_install:
# unpacking plugins
cd debian/tmp/usr/lib/python*/*-packages/deluge/plugins/; \
for EGG in *.egg; \
do \
mkdir -p $${EGG%-py?.*}.egg; \
unzip $${EGG} -d $${EGG%-py?.*}.egg; \
rm -f $${EGG}; \
done
# removing unused files
find debian/tmp -type d -name '__pycache__' | xargs rm -rf
|