diff --git a/debian/.gitignore b/debian/.gitignore index c5589b51b..78c29121b 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -7,6 +7,7 @@ *~ .#* /*.substvars +/*-tmp/ /control /control.md5sum /files diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 64fbcf2f0..d299ef252 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -8,7 +8,7 @@ from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags, Gencontro from debian_linux.utils import * class gencontrol(Gencontrol): - makefile_targets = ('binary-arch', 'binary-indep', 'build') + makefile_targets = ('binary-arch', 'binary-indep', 'build-arch', 'build-indep') def __init__(self, underlay = None): self.templates = Templates(['debian/templates']) diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile index 427c0de9b..a0f954fd4 100644 --- a/debian/build/tools/lib/lockdep/Makefile +++ b/debian/build/tools/lib/lockdep/Makefile @@ -21,9 +21,6 @@ install: cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/ ln -s liblockdep.so.$(VERSION) \ $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so -# Upstream lockdep preload script is not suitable for installation - sed 's/@VERSION@/$(VERSION)/' lockdep.in > $(DESTDIR)/usr/bin/lockdep - chmod 755 $(DESTDIR)/usr/bin/lockdep clean: rm -rf out diff --git a/debian/lockdep.dirs b/debian/lockdep.dirs new file mode 100644 index 000000000..e77248175 --- /dev/null +++ b/debian/lockdep.dirs @@ -0,0 +1 @@ +usr/bin diff --git a/debian/lockdep.install b/debian/lockdep.install deleted file mode 100644 index 236942003..000000000 --- a/debian/lockdep.install +++ /dev/null @@ -1 +0,0 @@ -usr/bin/lockdep diff --git a/debian/rules b/debian/rules index ee262a9fc..dad5e2ed7 100755 --- a/debian/rules +++ b/debian/rules @@ -11,13 +11,11 @@ build: build-arch build-indep build-arch: debian/control dh_testdir - $(MAKE) -f debian/rules.gen build + $(MAKE) -f debian/rules.gen build-arch -# XXX All we really need to do is to generate the lockdep script, -# but for now we take the stupid option of building everything. build-indep: debian/control dh_testdir - $(MAKE) -f debian/rules.gen build + $(MAKE) -f debian/rules.gen build-indep DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz @@ -42,7 +40,7 @@ maintainerclean: clean: debian/control dh_testdir make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ + rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp dh_clean binary-indep: diff --git a/debian/rules.real b/debian/rules.real index 303e16579..1eb2cf8e4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -13,7 +13,9 @@ endif binary-indep: install-lockdep -build: $(STAMPS_DIR)/build +build-arch: $(STAMPS_DIR)/build + +build-indep: $(STAMPS_DIR)/build: $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) @@ -63,14 +65,14 @@ install-perf: $(STAMPS_DIR)/build dh_builddeb install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip -install-usbip: DIR = $(CURDIR)/debian/tmp +install-usbip: DIR = $(CURDIR)/debian/usbip-tmp install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/out/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep $(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) - dh_install + dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs dh_lintian @@ -108,16 +110,16 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_builddeb install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev -install-liblockdep: DIR = $(CURDIR)/debian/tmp +install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp install-liblockdep: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ DESTDIR=$(DIR) - env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) \ + env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \ 'usr/lib/*/liblockdep.so.*' - dh_install + dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs dh_strip @@ -131,15 +133,18 @@ install-liblockdep: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -install-lockdep: DH_OPTIONS = -plockdep -install-lockdep: DIR = $(CURDIR)/debian/tmp -install-lockdep: $(STAMPS_DIR)/build +install-lockdep: PACKAGE_NAME = lockdep +install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME) +install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-lockdep: dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ - DESTDIR=$(DIR) - dh_install + dh_installdirs +# Upstream lockdep preload script is not suitable for installation + sed 's/@VERSION@/$(VERSION)/' $(BUILD_DIR)/tools/lib/lockdep/lockdep.in \ + > $(DIR)/usr/bin/lockdep + chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs dh_installdocs dh_compress