File: rules

package info (click to toggle)
radicale 3.0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,860 kB
  • sloc: python: 6,569; javascript: 909; sh: 292; xml: 93; makefile: 24; perl: 20
file content (40 lines) | stat: -rwxr-xr-x 1,204 bytes parent folder | download
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

cmd = radicale
_ENV_staged = $(strip \
 PATH="$(CURDIR)/debian/tmp/usr/bin:$(PATH)" \
 PYTHONPATH="$(CURDIR)/debian/tmp/usr/lib/$(shell py3versions -d)/dist-packages")

# generate manpage with help2man from --help option of python script
_mkman = $(_ENV_staged) \
 help2man $(if $3,--name "$(strip $3)") --no-info \
 --version-string="$(DEB_VERSION_UPSTREAM_REVISION)" \
 --output $2 $1 \
 || { $(_ENV_staged) $1 --help; false; }

# TODO: check testsuite at build-time
#export PYBUILD_BEFORE_TEST=cp -r {dir}/radicale {build_dir}
#export PYBUILD_AFTER_TEST=rm -rf {build_dir}/radicale
export PYBUILD_DISABLE=test

%:
	dh "$@" --buildsystem=pybuild

# Disable system daemons by default
override_dh_installinit:
	dh_installinit --package=radicale --no-enable
override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

# generate manpage based on --help option of script itself
override_dh_auto_install:
	dh_auto_install
	$(call _mkman, $(cmd), debian/$(cmd).1, \
		a simple calendar server)

# fix unset execution bit on FCGI and WSGI scripts
override_dh_fixperms:
	dh_fixperms
	chmod -x debian/radicale/usr/share/radicale/radicale.wsgi