File: rules

package info (click to toggle)
tiledb 1.7.7-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 29,916 kB
  • sloc: cpp: 90,754; ansic: 2,719; sh: 544; python: 298; makefile: 45; javascript: 16
file content (72 lines) | stat: -rwxr-xr-x 2,290 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DESTDIR=$(CURDIR)/debian/tmp

# Verbose CMake
export VERBOSE=1

# Workaround until https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953855 is fixed
export DEB_CXXFLAGS_MAINT_APPEND = -DSPDLOG_FMT_EXTERNAL -DFMT_HEADER_ONLY

PKG_SHORT_DESC := $(shell grep 'Description:' debian/control | tail -n 1 | cut -d':' -f2 | sed 's/^\s//')

ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
  CMAKE_TEST_ARG := -DTILEDB_TESTS=1
else
  CMAKE_TEST_ARG := -DTILEDB_TESTS=0
endif

%:
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	dh $@ --with sphinxdoc
else
	dh $@
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build/ doc/source/__pycache__/
	rm -f doc/source/_sidebar.rst.inc

override_dh_auto_configure:
	# -DTILEDB_WERROR=0 could be removed if Debian had catch >= 2
	# S3 support needs AWS C++ SDK which is not available in the archive
	# HDFS support will dlopen libhdfs.so on runtime but can be built with
	# TileDB Tools (cli tool) could be built if we add clipp.h in the archive
	dh_auto_configure -- \
	  -DTILEDB_WERROR=0 \
	  -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
	  -DTILEDB_S3=0 \
	  -DTILEDB_HDFS=1 \
	  -DTILEDB_TOOLS=0 \
	  $(CMAKE_TEST_ARG)

override_dh_auto_build:
	dh_auto_build
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	$(MAKE) -C obj-$(DEB_BUILD_GNU_TYPE) doc
	mkdir -p $(CURDIR)/build
	mv obj-$(DEB_BUILD_GNU_TYPE)/xml $(CURDIR)/build/
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/source/ build/html
	rm -rf build/html/.doctrees
endif

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
        # See https://github.com/TileDB-Inc/TileDB/pull/1499
	$(MAKE) -C obj-$(DEB_BUILD_GNU_TYPE)/tiledb tiledb_unit -j`nproc`
	obj-$(DEB_BUILD_GNU_TYPE)/tiledb/test/tiledb_unit '~*hdfs*'
endif

override_dh_auto_install:
	DESTDIR=$(DESTDIR) $(MAKE) -C obj-$(DEB_BUILD_GNU_TYPE)/tiledb install
	#mkdir -p $(DESTDIR)/usr/bin
	#mv -v obj-$(DEB_BUILD_GNU_TYPE)/tiledb/tools/tiledb $(DESTDIR)/usr/bin/
	#help2man \
	#  --no-info \
	#  --name="$(PKG_SHORT_DESC)" \
	#  --source="Debian" \
	#  $(DESTDIR)/usr/bin/tiledb > debian/tiledb.1
	# No idea how to override has it's not using cmake directly
	chrpath --delete $(CURDIR)/debian/tmp//usr/lib/*/libtiledb.so.*.*