[go: up one dir, main page]

File: rules

package info (click to toggle)
drbd-utils 8.9.10-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,272 kB
  • ctags: 7,630
  • sloc: ansic: 42,744; xml: 11,087; cpp: 7,121; sh: 2,461; makefile: 1,079; perl: 352
file content (57 lines) | stat: -rwxr-xr-x 1,744 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
53
54
55
56
57
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

PKG_VERSION=$(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2 }')

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --with bash-completion,autoreconf

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/drbd-utils.drbd.init

override_dh_auto_configure:
	./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
		--sbindir=/sbin --with-utils --with-udev --with-xen \
		--with-pacemaker --with-rgmanager --with-bashcompletion \
		--with-initscripttype=sysv \
		--with-bashcompletion=no

override_dh_auto_build:
	dh_auto_build
	$(MAKE) doc

override_dh_auto_install:
	dh_auto_install --destdir debian/drbd-utils
	# Shipped with dh_installman, upstream creates a dangling symlink
	rm debian/drbd-utils/usr/share/man/man8/drbd-overview.8

override_dh_install:
	dh_install --fail-missing

	# Move drbd-overview to /usr/sbin
	mv $(CURDIR)/debian/drbd-utils/sbin/drbd-overview $(CURDIR)/debian/drbd-utils/usr/sbin/

	# Place the initscript where dh_installinit can find it
	mv $(CURDIR)/debian/drbd-utils/etc/init.d/drbd $(CURDIR)/debian/drbd-utils.drbd.init

	# systemd/kmod integration
	install -D -m0644 $(CURDIR)/debian/drbd.modules-load.d $(CURDIR)/debian/drbd-utils/lib/modules-load.d/drbd.conf


override_dh_installinit:
	dh_installinit --name=drbd --no-start --no-restart-on-upgrade

override_dh_gencontrol:
	dh_gencontrol -Ndrbd8-utils
	# Add the previous epoch to drbd8-utils
	dh_gencontrol -pdrbd8-utils -- -v2:$(PKG_VERSION)

.PHONY: override_dh_auto_configure override_dh_install \
	override_dh_auto_clean override_dh_installinit \
	override_dh_gencontrol override_dh_auto_install \
	override_dh_auto_build