summaryrefslogtreecommitdiff
path: root/debian/rules.d/5-udebs.mk
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2010-09-03 00:03:56 -0600
committerJohn Fredriksson <john.xj.fredriksson@stericsson.com>2011-10-19 15:16:44 +0200
commit416cf007581a06a08e7b4c2f9100fbc2437b48d8 (patch)
tree3ba3970c9f2500a47ee899d9385ca6711b1fe46a /debian/rules.d/5-udebs.mk
parent4bfaf5b8b51ceb9168dd9014fd9fbae0b97b7eeb (diff)
LINARO: Add generic linaro packaging
Signed-off-by: John Rigby <john.rigby@linaro.org>
Diffstat (limited to 'debian/rules.d/5-udebs.mk')
-rw-r--r--debian/rules.d/5-udebs.mk38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/rules.d/5-udebs.mk b/debian/rules.d/5-udebs.mk
new file mode 100644
index 00000000000..24fbadffc8d
--- /dev/null
+++ b/debian/rules.d/5-udebs.mk
@@ -0,0 +1,38 @@
+# Do udebs if not disabled in the arch-specific makefile
+binary-udebs: binary-debs debian/control
+ifeq ($(disable_d_i),)
+ @$(MAKE) --no-print-directory -f $(DROOT)/rules DEBIAN=$(DEBIAN) \
+ do-binary-udebs
+endif
+
+do-binary-udebs:
+ dh_testdir
+ dh_testroot
+
+ # unpack the kernels into a temporary directory
+ mkdir -p debian/d-i-${arch}
+
+ imagelist=$$(cat $(builddir)/kernel-versions | grep ^${arch} | awk '{print $$4}') && \
+ for i in $$imagelist; do \
+ dpkg -x $$(ls ../linux-image-$$i\_$(release)-$(revision)_${arch}.deb) \
+ debian/d-i-${arch}; \
+ /sbin/depmod -b debian/d-i-${arch} $$i; \
+ done
+
+ # kernel-wedge will error if no modules unless this is touched
+ touch $(CURDIR)/debian/build/no-modules
+
+ touch ignore-dups
+ export SOURCEDIR=$(CURDIR)/debian/d-i-${arch} && \
+ cd $(builddir) && \
+ kernel-wedge install-files && \
+ kernel-wedge check
+
+ # Build just the udebs
+ dilist=$$(dh_listpackages -s | grep "\-di$$") && \
+ [ -z "$dilist" ] || \
+ for i in $$dilist; do \
+ dh_fixperms -p$$i; \
+ dh_gencontrol -p$$i; \
+ dh_builddeb -p$$i; \
+ done