File: rules

package info (click to toggle)
sbd 1.4.0-18-g5e3283c-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 396 kB
  • sloc: ansic: 3,944; sh: 441; makefile: 75
file content (36 lines) | stat: -rwxr-xr-x 1,211 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
#!/usr/bin/make -f

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# crm_config.h lives outside the default include direcotires.
# Moreover, we need to use std=gnu89 to prevent compiling errors.
export DEB_CFLAGS_MAINT_APPEND = -I/usr/include/$(shell dpkg-architecture -q DEB_TARGET_MULTIARCH)/pacemaker

# Avoid useless dependencies in the utilities
export DEB_LDFLAGS_MAINT_APPEND+=-Wl,--as-needed

%:
	dh $@

# We need to override the libdir, otherwise it will be installed
# within /usr/lib/${DEB_HOST_MULTIARCH} and pacemaker will not be
# able to find the external/sbd agent.
override_dh_auto_configure:
	dh_auto_configure -- --libdir=/usr/lib --bindir=/bin --with-configdir=/etc/default

override_dh_install:
	dh_install
	install -D -m 0755 src/sbd.sh        debian/sbd/etc/init.d/sbd
	install -D -m 0644 src/sbd.sysconfig debian/sbd/etc/default/sbd

override_dh_missing:
	dh_missing --fail-missing

# sbd is started through corosync.
override_dh_installinit:
	dh_installinit --only-scripts --no-start

# sbd_remote is started through pacemaker_remote.
override_dh_installsystemd:
	dh_installsystemd --no-start --no-restart-on-upgrade --no-restart-after-upgrade