[kernel] r6509 - in people/jurij/sample-module-package/debian: .
source
Jurij Smakov
jurij-guest at costa.debian.org
Sun Apr 30 18:07:29 UTC 2006
Author: jurij-guest
Date: Sun Apr 30 18:07:28 2006
New Revision: 6509
Modified:
people/jurij/sample-module-package/debian/rules.real
people/jurij/sample-module-package/debian/source/rules
Log:
Development changes.
Modified: people/jurij/sample-module-package/debian/rules.real
==============================================================================
--- people/jurij/sample-module-package/debian/rules.real (original)
+++ people/jurij/sample-module-package/debian/rules.real Sun Apr 30 18:07:28 2006
@@ -5,20 +5,17 @@
PKGSRC := $(PACKAGE)-source
STAMPDIR := debian/stamps
BUILDDIR := debian/build
+TARBALL := $(PWD)/debian/$(PKGSRC)/usr/src/$(PACKAGE).tar.bz2
+
#
# You should define the following targets here:
#
-binary-arch-flavour: TARBALL := $(PWD)/debian/$(PKGSRC)/usr/src/$(PACKAGE).tar.gz
-binary-arch-flavour: $(STAMPDIR)/install-source-stamp
+binary-arch-flavour: $(BUILDDIR)/$(PACKAGE).tar.bz2
dh_testdir
dh_testroot
rm -rf $(BUILDDIR)/modules
- cd $(BUILDDIR) && tar xzf $(TARBALL)
- # We have to remove debian/control.modules.in, otherwise m-a
- # will regenerate debian/control, overwriting our correct file
- rm -f $(BUILDDIR)/modules/$(PACKAGE)/debian/control.modules.in
- cp -a debian/changelog debian/control $(BUILDDIR)/modules/$(PACKAGE)/debian
- m-a -i -l $(VERSION)$(ABINAME)$(LOCALVERSION) -u $(BUILDDIR) build $(PACKAGE)
+ KPKG_DEST_DIR=$(PWD)/.. MOD_SRCDIR=$(PWD)/$(BUILDDIR) \
+ m-a -i -l $(VERSION)$(ABINAME)$(LOCALVERSION) -u $(BUILDDIR) build $(PACKAGE)
build:
$(MAKE) -f debian/rules.real build-source VERSION='$(VERSION)' ABINAME='$(ABINAME)'
@@ -28,6 +25,17 @@
binary-indep: build install
+$(BUILDDIR)/$(PACKAGE).tar.bz2: $(STAMPDIR)/install-source-stamp
+# Here we take the tarball which went into the -source package and
+# doctor it to ensure that it gets a correct changelog and control
+# file.
+ cd $(BUILDDIR) && tar xjf $(TARBALL)
+# control.modules.in has to be removed, otherwise m-a will overwrite
+# our correct control file.
+ rm -f $(BUILDDIR)/modules/$(PACKAGE)/debian/control.modules.in
+ cp -a debian/changelog debian/control $(BUILDDIR)/modules/$(PACKAGE)/debian
+ cd $(BUILDDIR) && tar cjf $(PACKAGE).tar.bz2 modules && rm -rf modules
+
#
# Target which builds the $(PACKAGE)-source package from which the
# binary modules may be built using modules-assistant.
@@ -62,7 +70,7 @@
$(wildcard $(BUILDDIR)/source/*) \
usr/src/modules/$(PACKAGE)/debian
cd debian/$(PKGSRC)/usr/src && \
- tar -czf $(PACKAGE).tar.gz modules && \
+ tar -cjf $(PACKAGE).tar.bz2 modules && \
rm -rf modules/*
dh_compress -p$(PKGSRC)
dh_fixperms -p$(PKGSRC)
Modified: people/jurij/sample-module-package/debian/source/rules
==============================================================================
--- people/jurij/sample-module-package/debian/source/rules (original)
+++ people/jurij/sample-module-package/debian/source/rules Sun Apr 30 18:07:28 2006
@@ -1,9 +1,11 @@
#!/usr/bin/make -f
# Base name of the package
-PACKAGE := foo
+PACKAGE := foo
+PKG_NAME := $(PACKAGE)-linux-modules-$(KVERS)
# Names of the modules to be installed, without extension
-MODULES := foo
+MODULES := foo
+MOD_EXT := $(addsuffix $(if ifeq($(KMAJ),2.6),.ko,.o),$(MODULES))
MA_DIR ?= /usr/share/modass
STAMPDIR := debian/stamps
@@ -29,19 +31,18 @@
dh_testdir
dh_testroot
- dh_installdirs
+ dh_installdirs -p$(PKG_NAME)
# Install the module files
- dh_install $(addsuffix $(if ifeq($(KMAJ),2.6),.ko,.o),$(MODULES)) \
- lib/modules/$(KVERS)/$(PACKAGE)
- dh_installdocs
- dh_installchangelogs
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb --destdir=$(DEB_DESTDIR)
+ dh_install -p$(PKG_NAME) $(MOD_EXT) lib/modules/$(KVERS)/$(PACKAGE)
+ dh_installdocs -p$(PKG_NAME)
+ dh_installchangelogs -p$(PKG_NAME)
+ dh_strip -p$(PKG_NAME)
+ dh_compress -p$(PKG_NAME)
+ dh_fixperms -p$(PKG_NAME)
+ dh_installdeb -p$(PKG_NAME)
+ dh_gencontrol -p$(PKG_NAME)
+ dh_md5sums -p$(PKG_NAME)
+ dh_builddeb --destdir=$(DEB_DESTDIR) -p$(PKG_NAME)
clean:
dh_testdir
More information about the Kernel-svn-changes
mailing list