| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
%: |
| 4 |
dh $@ --builddirectory=build |
| 5 |
|
| 6 |
override_dh_auto_configure: |
| 7 |
# upstream enables LTO only for the "Release" build type but Debian |
| 8 |
# uses the custom "None" type, so enable LTO here for all types |
| 9 |
dh_auto_configure -- -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DNINJA_PYTHON=python3 |
| 10 |
|
| 11 |
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) |
| 12 |
execute_after_dh_auto_build: |
| 13 |
# create build.ninja file with the "manual" target |
| 14 |
./configure.py |
| 15 |
build/ninja -v manual |
| 16 |
help2man --include=debian/ninja.1.in --output=build/ninja.1.org --no-info --no-discard-stderr build/ninja |
| 17 |
sed 's/\(default=\)[0-9]\+ on this system/\1\#CPUs/' build/ninja.1.org > build/ninja.1 |
| 18 |
if cmp --silent build/ninja.1.org build/ninja.1; then echo "sed pattern not found"; exit 1; fi |
| 19 |
endif |
| 20 |
|
| 21 |
override_dh_auto_test: |
| 22 |
# Deliberately ignore errors from ulimit. |
| 23 |
# It allows more tests to run but some archs/buildds have a lower hard limit. |
| 24 |
sh -c "ulimit -n 2000; build/ninja_test" |
| 25 |
|
| 26 |
override_dh_install-arch: |
| 27 |
dh_install |
| 28 |
mv debian/ninja-build/usr/share/bash-completion/completions/bash-completion \ |
| 29 |
debian/ninja-build/usr/share/bash-completion/completions/ninja |
| 30 |
mv debian/ninja-build/usr/share/zsh/vendor-completions/zsh-completion \ |
| 31 |
debian/ninja-build/usr/share/zsh/vendor-completions/_ninja |