rules (2213B)
1 #!/usr/bin/make -f 2 3 SHELL := sh -e 4 5 include /usr/share/dpkg/architecture.mk 6 7 %: 8 dh ${@} --buildsystem=meson 9 10 override_dh_builddeb: 11 dh_builddeb -- -Zgzip 12 13 override_dh_auto_configure-indep: 14 15 override_dh_auto_build-indep: 16 17 override_dh_auto_test: 18 # The reverse_proxy and paywall suites need a completed `make install' 19 # -- they resolve paivana-httpd and its templates through the prefix -- 20 # and start listeners, neither of which belongs in a build chroot. The 21 # rest have no such requirement, so run those rather than nothing at 22 # all; the ones needing node or tsc report themselves skipped when the 23 # chroot has neither. 24 # 25 # Named tests have to go to `meson test' directly: at debhelper compat 26 # 12 dh_auto_test runs `ninja test', which has no per-test targets, so 27 # the names would reach ninja as unknown targets and fail the build. 28 # Going around dh_auto_test means honouring nocheck here as well. 29 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) 30 meson test -C obj-$(DEB_HOST_GNU_TYPE) --print-errorlogs \ 31 client_address cookie_header cookie_access base64url paywall_typecheck 32 endif 33 34 override_dh_auto_install-arch: 35 # paivana-httpd is the only binary package, so dh_auto_install would 36 # install into debian/paivana-httpd/ and leave debian/tmp/, which 37 # debian/paivana-httpd.install reads from, empty. 38 dh_auto_install --destdir=debian/tmp 39 40 # Upstream installs README and COPYING into /usr/share/doc/paivana, 41 # which is not a path Debian wants: policy 12.3 puts documentation in 42 # /usr/share/doc/<binary package>, i.e. .../paivana-httpd. Drop the 43 # whole upstream directory -- COPYING is redundant with 44 # debian/copyright, and README is installed at the policy path by 45 # dh_installdocs out of debian/paivana-httpd.docs. 46 rm -rf debian/tmp/usr/share/doc/paivana 47 48 override_dh_auto_install-indep: 49 50 override_dh_auto_clean: 51 dh_auto_clean 52 53 override_dh_installsystemd: 54 dh_installsystemd -ppaivana-httpd --name=paivana-httpd --no-start --no-enable 55 # final invocation to generate daemon reload 56 dh_installsystemd 57 58 override_dh_install: 59 dh_install 60 # Done manually for debhelper-compat<13 61 dh_installtmpfiles 62 # Remove files already present in libpaivana-dev from paivana-httpd/libpaivana packages