File: rules

package info (click to toggle)
cbflib 0.9.7%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 65,272 kB
  • sloc: ansic: 131,361; python: 22,780; sh: 3,108; makefile: 2,088; yacc: 659; java: 223; f90: 214; xml: 210; cpp: 58
file content (99 lines) | stat: -rwxr-xr-x 2,738 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/make -f

# Building with HDF5/1.14.4.3, forwarded: https://github.com/yayahjb/cbflib/issues/66
export DEB_CPPFLAGS_MAINT_APPEND = -DH5_USE_110_API

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export PYBUILD_NAME=pycbf

# CBFlib makefile configuration vars
export INSTALL_LIB := lib/$(DEB_HOST_MULTIARCH)
export CBFLIB_DONT_USE_LOCAL_HDF5=yes
export CBFLIB_DONT_USE_LOCAL_NUWEB=yes
export CBFLIB_DONT_USE_LOCAL_REGEX=yes
export CBFLIB_DONT_USE_LOCAL_TIFF=yes
export CBFLIB_DONT_USE_LZ4=yes
export CBFLIB_DONT_USE_BSHUF=yes
export CBFLIB_DONT_USE_PY2CIFRW=yes
export CBFLIB_DONT_USE_PY3CIFRW=yes
export NOPYCBF=yes
export NOLIBIMG=yes
export NOFORTRAN=yes


pycbf/setup.py:
	$(MAKE) 'C++:=$$(CXX)' $(CURDIR)/pycbf/setup.py

# Parallel builds do not work
%:
	dh $@ --no-parallel

execute_after_dh_auto_clean-arch: pycbf/setup.py
	dh_auto_clean --buildsystem=pybuild --sourcedirectory=pycbf
	rm -f pycbf/setup.py
	rm -rf pycbf/pycbf.egg-info

execute_after_dh_auto_configure-arch: pycbf/setup.py
	dh_auto_configure --buildsystem=pybuild --sourcedirectory=pycbf

override_dh_auto_build-arch: pycbf/setup.py
	# build the C/C++ library
	dh_auto_build -- 'C++:=$$(CXX)' shared all

	# build the python extension.
	dh_auto_build --buildsystem=pybuild --sourcedirectory=pycbf

override_dh_auto_build-indep:
	# nothing to build here

# do not run test since we do not have the test data.
override_dh_auto_test:

override_dh_auto_install-arch: pycbf/setup.py
	# install the C/C++ library
	dh_auto_install

	# install the python extension
	dh_auto_install --buildsystem=pybuild --sourcedirectory=pycbf

override_dh_auto_install-indep:
	# nothing to install here

override_dh_install-arch:
	# cbflib-bin
	dh_install -p cbflib-bin usr/bin/cbf2nexus
	dh_install -p cbflib-bin usr/bin/cif2cbf
	dh_install -p cbflib-bin usr/bin/convert_image
	dh_install -p cbflib-bin usr/bin/img2cif
	dh_install -p cbflib-bin usr/bin/makecbf

	# libcbf-dev
	dh_install -p libcbf-dev usr/include/cbflib/*
	dh_install -p libcbf-dev usr/lib/*/lib*.a
	dh_install -p libcbf-dev usr/lib/*/lib*.so

	# libcbf1t64
	dh_install -p libcbf1t64 usr/lib/*/libcbf.so.*

	# Exclude duplicates (lintian check duplicate-files)
	dh_install -Xcif_img_1.3.2_22Jun05.html -Xcif_img_1.3.1.html

override_dh_install-indep:
	# cbflib-doc
	dh_install     -p cbflib-doc doc/*.html      usr/share/doc/cbflib-doc/html

override_dh_installdocs:
	# cbflib-doc
	dh_installdocs -p cbflib-doc html_graphics

	# libcbf-dev
	dh_installdocs -p libcbf-dev README

	dh_installdocs

override_dh_installman:
	dh_installman -p cbflib-bin debian/manpages/*