File: rules

package info (click to toggle)
cbflib 0.9.6%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 56,196 kB
  • sloc: ansic: 103,920; python: 4,552; sh: 3,032; makefile: 1,822; yacc: 659; f90: 210; xml: 210; cpp: 58; java: 16
file content (91 lines) | stat: -rwxr-xr-x 2,358 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
#!/usr/bin/make -f

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_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_PYCIFRW=yes
export NOPYCBF=yes
export NOLIBIMG=yes
export NOFORTRAN=yes


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

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

override_dh_auto_clean:
	dh_auto_clean

	$(create_setup.py)
	dh_auto_clean --buildsystem=pybuild --sourcedirectory=pycbf
	rm -f pycbf/setup.py

override_dh_auto_configure:
	dh_auto_configure

	$(create_setup.py)
	dh_auto_configure --buildsystem=pybuild --sourcedirectory=pycbf

override_dh_auto_build:
	# build the C/C++ library
	dh_auto_build -- 'C++:=$$(CXX)' all

	# build the python extension.
	$(create_setup.py)
	dh_auto_build --buildsystem=pybuild --sourcedirectory=pycbf

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

override_dh_auto_install:
	# install the C/C++ library
	dh_auto_install

	# install the python extension
	$(create_setup.py)
	dh_auto_install --buildsystem=pybuild --sourcedirectory=pycbf

override_dh_install:
	# 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

	# libcbf1
	dh_install -p libcbf1 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_installdocs:
	# cbflib-doc
	dh_install     -p cbflib-doc doc/*.html      usr/share/doc/cbflib-doc/html
	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/*