Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # DH_VERBOSE := 1
4
5 include /usr/share/dpkg/pkg-info.mk
6
7 UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
8
9
10 export DEB_BUILD_MAINT_OPTIONS=hardening=+all optimize=+lto
11 export PYBUILD_NAME=lerc
12
13 %:
14 dh $@ --buildsystem=cmake
15
16 override_dh_auto_clean:
17 dh_auto_clean
18 dh_auto_clean --builddirectory build-static
19 if command -v pybuild >/dev/null; then dh_auto_clean --buildsystem=pybuild --sourcedirectory=OtherLanguages/Python; fi
20
21 override_dh_auto_configure:
22 dh_auto_configure
23 dh_auto_configure --builddirectory build-static -- -DBUILD_SHARED_LIBS=FALSE
24
25 override_dh_auto_build:
26 dh_auto_build
27 dh_auto_build --builddirectory build-static
28
29 override_dh_auto_test:
30 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
31 env LD_LIBRARY_PATH=$(shell dirname $(CURDIR)/*/libLerc.so) PYTHONPATH=$(CURDIR)/OtherLanguages/Python \
32 python3 -c "import lerc; assert lerc.test() == 0"
33 endif
34
35 execute_after_dh_auto_install:
36 dh_auto_install --builddirectory build-static
37
38 override_dh_auto_install-indep:
39 dh_auto_install --buildsystem=pybuild -ppython3-lerc --sourcedirectory=OtherLanguages/Python
40
41 # Ubuntu wants the build to fail when symbols disappear
42 override_dh_makeshlibs:
43 ifneq ($(shell dpkg-vendor --query vendor),Ubuntu)
44 dh_makeshlibs -- -v$(UPSTREAM_VERSION) -c0
45 else
46 dh_makeshlibs -- -v$(UPSTREAM_VERSION)
47 endif
48
49 override_dh_numpy3:
50 dh_numpy3 -p python3-lerc