summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 92171039d564ded15174a0c841b681153598210f (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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#DH_VERBOSE=1

%:
	dh $@ --with systemd --with python2 --namespace=leap.soledad

override_dh_auto_install:
	cd client && python setup.py install --root=../debian/soledad-client
	cd common && python setup.py install --root=../debian/soledad-common
	cd server && LEAP_SKIP_INIT=1 python setup.py install --root=../debian/soledad-server

override_dh_install:
	# leap.soledad provides the leap.soledad namespace __init__.py
	for pv in $(shell pyversions -vr debian/control); do \
	    cp common/src/leap/__init__.py debian/soledad-common/usr/local/lib/python$$pv/*-packages/leap/; \
	    cp common/src/leap/__init__.py debian/soledad-common/usr/local/lib/python$$pv/*-packages/leap/soledad/; \
	done

override_dh_installinit:
	dh_systemd_enable -p${NAME} --name=${NAME} ${NAME}.service
	dh_installinit -p${NAME} --no-start --noscripts

override_dh_auto_clean:
	cd client && python setup.py clean -a
	cd common && python setup.py clean -a
	cd server && python setup.py clean -a
	find . -name "*.pyc" -delete
	rm -rf testing/.tox
	dh_auto_clean