aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2011-09-16 14:46:00 +0100
committerJohn Rigby <john.rigby@linaro.org>2011-11-16 14:49:29 -0700
commitd8105381c1780afb1f4eb26cb3469cad8e26fc0c (patch)
tree3826779bf6ee1bb19ac192f5bb2e11783734f0af /debian
parent1516704d53e40c4b3146aaa35d13563d80922dee (diff)
UBUNTU: add a new linux-image-extras package for virtual
Add a new linux-image-extras package for the virtual flavours. This package contains all of the left over kernel modules which are not in the main linux-image package. This allows users to opt-in to a full server style install in a virtual machine, preventing slow bloat of the core linux-image install. Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'debian')
-rw-r--r--debian/rules.d/0-common-vars.mk1
-rw-r--r--debian/rules.d/2-binary-arch.mk22
2 files changed, 19 insertions, 4 deletions
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 13602c4dbf1..8915c40826e 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -130,6 +130,7 @@ stampdir := $(CURDIR)/debian/stamps
# assumption that the binary package always starts with linux-image will never change.
#
bin_pkg_name=linux-image-$(abi_release)
+extra_pkg_name=linux-image-extra-$(abi_release)
hdrs_pkg_name=linux-headers-$(abi_release)
#
# The generation of content in the doc package depends on both 'AUTOBUILD=' and
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index c0259e635fc..7a42734e6c7 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -37,6 +37,7 @@ $(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
# Install the finished build
install-%: pkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*
+install-%: pkgdir_ex = $(CURDIR)/debian/$(extra_pkg_name)-$*
install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
install-%: basepkg = $(hdrs_pkg_name)
@@ -82,17 +83,16 @@ endif
# Remove all modules not in the inclusion list.
#
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
- mkdir -p $(pkgdir)-ALL/lib/modules/$(abi_release)-$*; \
+ mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
- $(pkgdir)-ALL/lib/modules/$(abi_release)-$*/kernel; \
+ $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \
$(SHELL) $(DROOT)/scripts/module-inclusion --master \
- $(pkgdir)-ALL/lib/modules/$(abi_release)-$*/kernel \
+ $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
$(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
$(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
tee $(target_flavour).inclusion-list.log; \
/sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \
$(abi_release)-$* 2>&1 |tee $(target_flavour).depmod.log; \
- rm -rf $(pkgdir)-ALL; \
fi
ifeq ($(no_dumpfile),)
@@ -274,9 +274,11 @@ endif
endif
binary-%: pkgimg = $(bin_pkg_name)-$*
+binary-%: pkgimg_ex = $(extra_pkg_name)-$*
binary-%: pkghdr = $(hdrs_pkg_name)-$*
binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
+binary-%: target_flavour = $*
binary-%: install-%
dh_testdir
dh_testroot
@@ -291,6 +293,18 @@ binary-%: install-%
dh_md5sums -p$(pkgimg)
dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
+ if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
+ dh_installchangelogs -p$(pkgimg_ex); \
+ dh_installdocs -p$(pkgimg_ex); \
+ dh_compress -p$(pkgimg_ex); \
+ dh_fixperms -p$(pkgimg_ex) -X/boot/; \
+ dh_installdeb -p$(pkgimg_ex); \
+ dh_shlibdeps -p$(pkgimg_ex); \
+ dh_gencontrol -p$(pkgimg_ex); \
+ dh_md5sums -p$(pkgimg_ex); \
+ dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
+ fi
+
dh_installchangelogs -p$(pkghdr)
dh_installdocs -p$(pkghdr)
dh_compress -p$(pkghdr)