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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#!/usr/bin/make -f
INITRAMFS=$(CURDIR)/debian/multipath-tools-boot/usr/share/initramfs-tools/
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM = install -s
else
INSTALL_PROGRAM = install
endif
# Work around misp(el) linker bug:
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=10144
DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(findstring mips,$(DEB_HOST_ARCH)))
OPTFLAGS = "OPTFLAGS=-pipe -Wall -Wunused -Wstrict-prototypes"
endif
# For Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DISABLE_SYSTEMD = 1
build: build-arch build-indep
build-arch: build-multipath-udeb-stamp build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
[ ! -f kpartx/kpartx.rules ] || cp kpartx/kpartx.rules debian/kpartx.udev
$(MAKE) $(OPTFLAGS) LIB=lib
touch $@
# multipath-udeb: build separately; don't reference dynamic libgcc at runtime (#779579)
build-multipath-udeb-stamp:
dh_testdir
DEB_CFLAGS_MAINT_APPEND="-static-libgcc" $(MAKE) $(OPTFLAGS) LIB=lib
# store files for install target
mkdir -p $(CURDIR)/debian/tmp-multipath-udeb/sbin
$(MAKE) install INSTALL_PROGRAM=$(INSTALL_PROGRAM) DESTDIR=$(CURDIR)/debian/tmp-multipath-udeb LIB=lib
$(MAKE) clean
touch $@
clean-tree:
$(MAKE) clean
clean: clean-tree
dh_testdir
rm -f build-stamp build-multipath-udeb-stamp
dh_prep
debconf-updatepo
rm -rf debian/*.debhelper.log
rm -rf debian/tmp-multipath-udeb
install:
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -p $(CURDIR)/debian/tmp/sbin
$(MAKE) install INSTALL_PROGRAM=$(INSTALL_PROGRAM) DESTDIR=$(CURDIR)/debian/tmp LIB=lib
install -m 755 debian/dmsetup_env $(CURDIR)/debian/tmp/lib/udev/
dh_install -X.rules --fail-missing -Nmultipath-udeb --sourcedir=$(CURDIR)/debian/tmp
dh_install -X.rules --fail-missing -pmultipath-udeb --sourcedir=$(CURDIR)/debian/tmp-multipath-udeb
# initramfs stuff:
install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/multipath
install -D -m 755 debian/initramfs/local-top \
$(INITRAMFS)/scripts/local-top/multipath
install -D -m 755 debian/initramfs/init-top \
$(INITRAMFS)/scripts/init-top/multipath
# reportbug:
for pkg in "multipath-tools" "multipath-tools-boot"; do \
install -D -m 755 debian/reportbug/script debian/$${pkg}/usr/share/bug/$${pkg}/script; \
done
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_lintian
dh_installinit -pmultipath-tools
dh_installinit -pmultipath-tools --name=multipath-tools-boot --no-start -- start 21 S .
dh_installudev -pkpartx
dh_installudev -pmultipath-tools --name=multipath
dh_installdebconf -pmultipath-tools-boot
dh_installman
dh_makeshlibs --add-udeb=multipath-udeb
dh_link
dh_strip --dbg-package=multipath-tools-dbg
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep unpack configure build clean
|