File: rules

package info (click to toggle)
dmraid 1.0.0.rc16-12
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 4,512 kB
  • sloc: ansic: 16,997; sh: 2,996; makefile: 265
file content (88 lines) | stat: -rwxr-xr-x 2,345 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS= --build $(DEB_BUILD_GNU_TYPE)
endif

version := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-[^-]*$$/\1/p')

common-config-flags := $(CROSS) --prefix=/usr --exec-prefix=/ '--libdir=$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)'

methods: methods-stamp
methods-stamp:
	dh_testdir
	cp -f /usr/share/misc/config.sub 1.0.0.rc16/autoconf/config.sub
	cp -f /usr/share/misc/config.guess 1.0.0.rc16/autoconf/config.guess
	touch $@

configure: methods configure-stamp
configure-stamp:
	dh_testdir
	cd ${version} && \
	./configure ${common-config-flags} --disable-klibc --enable-libselinux --enable-libsepol --enable-shared_lib --enable-led --enable-intel_led
	touch $@

build-arch: build
build-indep: build

build: $(QUILT_STAMPFN) configure build-stamp
build-stamp:
	dh_testdir
	cd ${version} && make
	touch $@

install: build
	dh_testdir
	dh_testroot
	dh_prep
	cd ${version} && make DESTDIR=$(CURDIR)/debian/tmp install
	dh_link

binary-arch: install
	dh_testdir
	dh_testroot
	dh_install
	dh_installdirs
	dh_installudev --priority=97
	dh_installdocs ${version}/CREDITS ${version}/KNOWN_BUGS ${version}/README ${version}/TODO
	dh_installchangelogs ${version}/CHANGELOG
	install -m0755 debian/dmraid.bug debian/dmraid/usr/share/bug/dmraid/script
	chmod 755 debian/dmraid/usr/share/initramfs-tools/hooks/dmraid
	chmod 755 debian/dmraid/usr/share/initramfs-tools/scripts/local-top/dmraid
	chmod 755 debian/dmraid/sbin/dmraid-activate
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -V
	dh_shlibdeps -a
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: install
	# nothing to do

binary: binary-arch binary-indep

clean:
	dh_testdir
	dh_testroot
	dh_clean
	$(RM) *-stamp
	$(RM) 1.0.0.rc16/autoconf/config.guess
	$(RM) 1.0.0.rc16/autoconf/config.sub

.PHONY: clean binary binary-indep binary-arch install build configure methods