summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 846c76e319938a57b5a8dcb9449297e02dd93a32 (plain)
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
#!/usr/bin/make -f

SHELL := sh -e

%:
	dh ${@} --buildsystem=pybuild --with=python3

execute_after_dh_auto_test:
	find . -type d -name '*.egg-info' | xargs rm -rf
	find . -type d -name '.eggs' | xargs rm -rf
	find . -type d -wholename './deluge/plugins/*/build' | xargs rm -rf

	rm -f deluge/data/share/applications/deluge.desktop

override_dh_auto_build:
	python3 setup.py build

override_dh_auto_test:
	# disabled

override_dh_auto_install:
	python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb

	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

	find . -type d -name '__pycache__' | xargs rm -rf