Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 NULL =
10
11 # Uncomment this to turn on verbose mode.
12 # export DH_VERBOSE=1
13
14 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
15 DPKG_EXPORT_BUILDFLAGS = 1
16 include /usr/share/dpkg/buildflags.mk
17
18 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
19
20 include /usr/share/dpkg/default.mk
21
22 # Ignore test failures on less relevant architectures
23 testskip_architectures := s390x
24
25 %:
26 dh $@
27
28 override_dh_install:
29 rm -Rv debian/tmp/usr/lib/*/lomiri-location-service/examples/
30 rm -Rv debian/tmp/usr/share/lomiri-location-service/examples/
31 cd debian/tmp/usr/share/doc/lomiri-location-service/html/ && rdfind -makesymlinks true -makeresultsfile false .
32 cd debian/tmp/usr/share/doc/lomiri-location-service/html/ && symlinks -rc .
33 dh_install -Xlomiri-location-service.1
34
35 override_dh_auto_configure:
36 # -dM -E do not compile anything but only generate lists of #define, no hardening flags are needed here
37 @echo 'blhc: ignore-line-regexp: .*g\+\+.*-dM -E.*'
38 if [ ! -e po/lomiri-location-service.pot.deb-bak ]; then cp po/lomiri-location-service.pot po/lomiri-location-service.pot.deb-bak; fi
39 dh_auto_configure --builddirectory=build-qt5 -- \
40 -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/lomiri-location-service \
41 -DCMAKE_C_COMPILER=$(CC) \
42 -DCMAKE_CXX_COMPILER=$(CXX) \
43 -DENABLE_TRUST_STORE=OFF \
44 -DLOCATION_SERVICE_ENABLE_GPS_PROVIDER=OFF \
45 -DLOCATION_SERVICE_ENABLE_GEOCLUE_PROVIDER=ON \
46 -DENABLE_QT6=OFF \
47 $(NULL)
48 dh_auto_configure --builddirectory=build-qt6 -- \
49 -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/lomiri-location-service \
50 -DCMAKE_C_COMPILER=$(CC) \
51 -DCMAKE_CXX_COMPILER=$(CXX) \
52 -DENABLE_TRUST_STORE=OFF \
53 -DLOCATION_SERVICE_ENABLE_GPS_PROVIDER=OFF \
54 -DLOCATION_SERVICE_ENABLE_GEOCLUE_PROVIDER=ON \
55 -DENABLE_QT6=ON \
56 $(NULL)
57
58 override_dh_auto_build:
59 dh_auto_build --builddirectory=build-qt5
60 dh_auto_build --builddirectory=build-qt6
61
62 # Don't run tests in parallel as fake web servers all bind to same port
63 override_dh_auto_test:
64 ifeq (,$(filter $(DEB_HOST_ARCH),$(testskip_architectures)))
65 dh_auto_test --builddirectory=build-qt5 --no-parallel -- ARGS+="-E '^(remote_providerd_test|delayed_service_test|daemon_and_cli_tests)'"
66 dh_auto_test --builddirectory=build-qt6 --no-parallel -- ARGS+="-E '^(remote_providerd_test|delayed_service_test|daemon_and_cli_tests)'"
67 else
68 dh_auto_test --builddirectory=build-qt5 --no-parallel -- ARGS+="-E '^(remote_providerd_test|delayed_service_test|daemon_and_cli_tests|acceptance_tests)'"
69 dh_auto_test --builddirectory=build-qt6 --no-parallel -- ARGS+="-E '^(remote_providerd_test|delayed_service_test|daemon_and_cli_tests|acceptance_tests)'"
70 endif
71
72 override_dh_auto_install:
73 dh_auto_install --builddirectory=build-qt6
74 dh_auto_install --builddirectory=build-qt5
75
76 execute_before_dh_clean:
77 -mv po/lomiri-location-service.pot.deb-bak po/lomiri-location-service.pot
78
79 get-orig-source:
80 uscan --noconf --force-download --rename --download-current-version --destdir=..