File: rules

package info (click to toggle)
mdadm 4.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,948 kB
  • sloc: ansic: 46,817; sh: 2,481; makefile: 281; python: 44
file content (36 lines) | stat: -rwxr-xr-x 1,141 bytes parent folder | download | duplicates (2)
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

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/vendor.mk

export CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-
export LDFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS)
export CXFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS) \
	  $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS)

export DEBIAN="yes"
export EXTRAVERSION=$(DEB_VENDOR) $(DEB_VERSION)

# these are reversed in the Makefile
export CONFFILE="/etc/mdadm/mdadm.conf"
export CONFFILE2="/etc/mdadm.conf"

%:
	dh $@

execute_after_dh_auto_clean:
	# remove generated files
	for file in $$(find . -type f -name "*.in"); \
	do \
		rm -f "$$(dirname "$${file}")"/"$$(basename "$${file}" .in)"; \
	done

execute_before_dh_install:
	$(MAKE) install-systemd DESTDIR=$(CURDIR)/debian/tmp

execute_after_dh_install:
	mkdir -p $(CURDIR)/debian/mdadm/etc/mdadm
	chmod +x $(CURDIR)/debian/mdadm/usr/share/mdadm/mdcheck

override_dh_installsystemd:
	dh_installsystemd -pmdadm mdcheck_continue.timer mdcheck_start.timer mdmonitor-oneshot.timer