File: rules

package info (click to toggle)
shepherd 1.0.9-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,828 kB
  • sloc: lisp: 8,779; sh: 3,586; makefile: 290; ansic: 50
file content (52 lines) | stat: -rwxr-xr-x 1,716 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
		--with-bash-completion-dir=/usr/share/bash-completion/completions \
		GUILE_EFFECTIVE_VERSION=3.0

execute_before_dh_auto_build:
	rm -fv doc/shepherd.info
	rm -fv doc/herd.1 doc/shepherd.1
	rm -fv doc/halt.8 doc/reboot.8

# Upstream self-tests are notoriously flaky -- sometimes caused by bugs in
# Guile -- so let's run all tests but only FTBFS if tests/basic.sh fails.
#
# https://issues.guix.gnu.org/77132
# https://codeberg.org/shepherd/shepherd/issues/20
# https://codeberg.org/shepherd/shepherd/issues/19
# https://codeberg.org/shepherd/shepherd/issues/84
# https://codeberg.org/shepherd/shepherd/issues/110
# https://codeberg.org/shepherd/shepherd/issues/111
override_dh_auto_test:
	timeout --kill-after=1m 5m dh_auto_test $(DH_BUILD_OPTS) -- TESTS="tests/basic.sh"
	-timeout --kill-after=1m 5m dh_auto_test $(DH_BUILD_OPTS)

override_dh_auto_install:
	dh_auto_install $(DH_BUILD_OPTS) --destdir=debian/tmp

execute_after_dh_auto_install:
	mkdir -pv debian/tmp/usr/libexec/shepherd/sbin
	mv -v -t debian/tmp/usr/libexec/shepherd/sbin/ \
		debian/tmp/usr/sbin/halt     \
		debian/tmp/usr/sbin/reboot   \
		debian/tmp/usr/sbin/shutdown
	mv -v debian/tmp/usr/share/man/man8/halt.8 \
		debian/tmp/usr/share/man/man8/shepherd-halt.8
	mv -v debian/tmp/usr/share/man/man8/reboot.8 \
		debian/tmp/usr/share/man/man8/shepherd-reboot.8
	rmdir -v debian/tmp/usr/sbin
	rmdir -v debian/tmp/var/run/shepherd debian/tmp/var/run debian/tmp/var

override_dh_dwz:
	dh_dwz --exclude=.go

override_dh_shlibdeps:
	dh_shlibdeps --exclude=.go