Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # generate documentation unless nodoc requested
4 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
5 MANPAGES = debian/hx.1
6 endif
7
8 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
10 export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
11
12 # trust upstream optimization level unless explicitly disabled
13 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
14 export DEB_CFLAGS_MAINT_STRIP = -O2
15 export DEB_CXXFLAGS_MAINT_STRIP = -O2
16 # match additional tunings set in build profile "opt"
17 export RUSTFLAGS = -C lto -C codegen-units=1
18 endif
19
20 export HELIX_DEFAULT_RUNTIME = /usr/lib/hx/runtime
21
22 # avoid network during build
23 export HELIX_DISABLE_AUTO_GRAMMAR_BUILD = 1
24
25 %:
26 dh $@
27
28 execute_before_dh_gencontrol:
29 printf 'hx:PluginAbi=%s\n' "$$(cat debian/hx-plugin-dev/usr/share/hx-plugin-dev/plugin-abi)" >> debian/hx.substvars
30
31 execute_after_dh_auto_install: $(MANPAGES)
32 mkdir --parents debian/build
33 cp contrib/completion/hx.zsh debian/build/_hx
34 mkdir --parents debian/hx-plugin-dev/usr/share/hx-plugin-dev
35 { \
36 find languages.toml runtime/queries -type f -print 2>/dev/null \
37 | LC_ALL=C sort \
38 | while IFS= read -r file; do \
39 printf '%s\n' "$$file"; \
40 sha256sum "$$file" | sed 's/[[:space:]].*//'; \
41 done; \
42 } | sha256sum | sed 's/^\([0-9a-f]\{16\}\).*/hx-plugin-abi-\1/' \
43 > debian/hx-plugin-dev/usr/share/hx-plugin-dev/plugin-abi
44
45 # build manpages
46 # set XDG_CACHE_HOME to make build reproducible (bug#1100016)
47 debian/hx.1: XDG_CACHE_HOME = /home/\$USER/.cache
48 debian/hx.1: debian/%.1: debian/hx/usr/bin/%
49 mkdir --parents $(dir $@)
50 help2man --section 1 --no-info \
51 --name "efficient command-line modal text-editor" \
52 --output $@ $< \
53 || { $1 --help; false; }