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

# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.0.1:9

export PYBUILD_NAME=leap.soledad

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

NAME=soledad-server

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

override_dh_prep:
	(cd ./docs/man; for src in *.rst; do tgt=$$(basename $${src} .rst); rst2man $${src} $${tgt}; done)
	PYTHONPATH=./ ./scripts/packaging/replace-version-file.py
	dh_prep

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

override_dh_auto_clean:
	dh_auto_clean
	find . -name "*.pyc" -exec rm -rf {} \;
	find . -name ".tox" -exec rm -rf {} \;
	rm -f docs/man/*.1