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 120 121 122
|
#!/usr/bin/make -f
SHELL=/bin/bash -e
#export DH_VERBOSE=1
BUILD_UDEB := 1
# for dpkg-cross
DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFARGS := --host=$(DEB_HOST_GNU_TYPE)
endif
include debian/scripts/vars
BUILD_DIR := $(SOURCE_DIR)/$(TAR_DIR)
B := $(BUILD_DIR)
O := $(BUILD_DIR)/obj
D := $(CURDIR)/debian/module-init-tools
all: build
unpack: $(STAMP_DIR)/unpack
$(STAMP_DIR)/unpack:
$(MAKE) -f debian/sys-build.mk source.make
touch $@
# used by the maintainer
unpack.nopatch:
$(MAKE) -f debian/sys-build.mk source.build
# used by the maintainer
diff:
$(MAKE) -f debian/sys-build.mk make-diff
clean:
$(MAKE) -f debian/sys-build.mk source.clean
dh_clean
configure: $(STAMP_DIR)/configure
$(STAMP_DIR)/configure: $(STAMP_DIR)/unpack
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
mkdir obj/ && \
cd obj/ && \
../configure --prefix=/ $(CONFARGS) \
"
ifdef BUILD_UDEB
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
mkdir obj-udeb/ && \
cd obj-udeb/ && \
CFLAGS='-Os -fomit-frame-pointer -DCONFIG_NO_BACKWARDS_COMPAT' \
../configure --prefix=/ --disable-zlib $(CONFARGS) \
"
endif
touch $@
build: $(STAMP_DIR)/build
$(STAMP_DIR)/build: $(STAMP_DIR)/configure
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
cd obj && $(MAKE) \
"
ifdef BUILD_UDEB
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
cd obj-udeb && $(MAKE) lsmod insmod depmod modprobe \
"
endif
touch $@
install: $(STAMP_DIR)/build checkroot
dh_testdir
dh_clean -k
dh_installdirs bin/ sbin/ etc/modprobe.d/arch/ lib/modules/
dh_install --sourcedir=$O -p module-init-tools
cp extra/modprobe.d/aliases $D/etc/modprobe.d/
install --mode=755 extra/update-modules $D/sbin/
sh extra/installarchconf $D/etc/modprobe.d/arch/
ifdef BUILD_UDEB
dh_installdirs bin/ sbin/ etc/ -p module-init-tools-udeb
dh_install --sourcedir=$O-udeb -p module-init-tools-udeb
cp -a extra/modprobe.d/aliases $D-udeb/etc/modprobe.conf
endif
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs $B/ChangeLog
dh_installdocs $B/TODO $B/FAQ
dh_installexamples $B/generate-modprobe.conf $B/modprobe.devfs
# do not install out of date french man pages
dh_installman extra/*.5 extra/*.8 $B/*.5 $B/*.8 #extra/man-fr/*
sh -e extra/fixmanpages $D
dh_installinit --no-start --update-rcd-params="start 20 S ."
dh_link bin/lsmod sbin/lsmod
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_builddeb
binary: binary-arch
checkroot:
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep unpack configure build clean checkroot
|