File: rules

package info (click to toggle)
lerc 4.0.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 996 kB
  • sloc: cpp: 9,022; python: 656; makefile: 28; sh: 8
file content (42 lines) | stat: -rwxr-xr-x 1,201 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
#!/usr/bin/make -f

# DH_VERBOSE := 1

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

UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')


export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYBUILD_NAME=lerc

%:
	dh $@ --with python3,pkgkde_symbolshelper --buildsystem=cmake

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --builddirectory build-static
	dh_auto_clean --buildsystem=pybuild --sourcedirectory=OtherLanguages/Python
	$(RM) -r OtherLanguages/Python/lerc.egg-info

override_dh_auto_configure:
	dh_auto_configure
	dh_auto_configure --builddirectory build-static -- -DBUILD_SHARED_LIBS=FALSE

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --builddirectory build-static

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	env LD_LIBRARY_PATH=$(shell dirname $(CURDIR)/*/libLerc.so) PYTHONPATH=$(CURDIR)/OtherLanguages/Python \
		python3 -c "import lerc; assert lerc.test() == 0"
endif

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild -ppython3-lerc --sourcedirectory=OtherLanguages/Python
	dh_auto_install --builddirectory build-static
	dh_auto_install

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION) -c0