Debian Codegraph @

debian/rules

raw
1 #! /usr/bin/make -f
2 %:
3 dh $@
4
5 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
6 export DEB_CPPFLAGS_MAINT_APPEND := -D_FILE_OFFSET_BITS=64
7
8 include /usr/share/dpkg/default.mk
9
10 # Ensure that Halibut's own documentation is built in a consistent locale
11 # and timezone to avoid reproducibility problems.
12 export LC_ALL := C.UTF-8
13 export TZ := UTC
14
15 cmakeflags := -DCMAKE_INSTALL_DOCDIR=share/doc/halibut/html
16
17 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
18 override_dh_auto_configure:
19 dh_auto_configure -- $(cmakeflags)
20 else
21 # When cross-compiling, we need to do a native build as well and use the
22 # documentation built by that. (In principle it should also be possible to
23 # tell the cross build to use the halibut executable built by the native
24 # build, but persuading the upstream build system to do it that way round is
25 # more awkward.)
26 override_dh_auto_configure:
27 dh_auto_configure -- $(cmakeflags)
28 dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --reload-all-buildenv-variables -- \
29 $(cmakeflags)
30
31 override_dh_auto_build:
32 dh_auto_build
33 dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build
34
35 override_dh_auto_clean:
36 dh_auto_clean
37 dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_clean
38
39 override_dh_auto_install:
40 dh_auto_install
41 $(MAKE) -C obj-$(DEB_BUILD_GNU_TYPE)/doc install \
42 DESTDIR=$(CURDIR)/debian/halibut
43 endif