File: rules

package info (click to toggle)
pymol 2.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 43,312 kB
  • sloc: cpp: 480,106; python: 79,860; ansic: 28,343; javascript: 6,792; sh: 47; makefile: 30; csh: 8
file content (47 lines) | stat: -rwxr-xr-x 1,365 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
41
42
43
44
45
46
47
#!/usr/bin/make -f
# -*- Makefile -*-

#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
# since this package produces shared library, not executable -
# -fPIE, -pie compiler/linker options are turned off.

export PYBUILD_NAME = pymol

%:
	dh $@ --with python3 --buildsystem pybuild

# FIXME: many of these tests
# FIXME: the test suite passes despite tests failing
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	chmod +x test/pymol-test
	PYBUILD_SYSTEM="custom" \
	  PYBUILD_BEFORE_TEST="cp -r {dir}/test {build_dir}" \
	  PYBUILD_AFTER_TEST="rm -rf {build_dir}/test" \
	  PYBUILD_TEST_ARGS="cd {build_dir}/test; PYMOL_PATH={build_dir} python{version} run" \
	  dh_auto_test
endif

override_dh_clean:
	$(RM) -r build test/tmp test/cmp generated
	dh_clean debian/pymol.launch debian/pymol-ref-card.* \
	         Rules.make create_shadertext.pyc

override_dh_install-indep: debian/pymol.launch debian/pymol-ref-card.pdf
	dh_install
	install -m 755 debian/pymol.launch debian/pymol/usr/bin/pymol

override_dh_install-arch:
	dh_numpy3
	dh_install
	rm -rf debian/python*pymol/usr/bin

override_dh_compress:
	dh_compress -Xpdb

debian/pymol-ref-card.pdf: debian/pymolRef.tex
	pdflatex -output-directory $(@D) -jobname pymol-ref-card $<

debian/pymol.launch: debian/pymol.launch.in
	sed -e s/@PYTHON_VERSION@/3/g < $< > $@