2006-03-28 21:46:39 +00:00
|
|
|
export DH_OPTIONS
|
2015-07-13 19:31:07 +00:00
|
|
|
export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: ,,p')
|
2006-03-28 21:46:39 +00:00
|
|
|
|
|
|
|
include debian/rules.defs
|
|
|
|
|
2016-02-19 19:17:44 +00:00
|
|
|
define submake
|
2016-02-19 20:05:58 +00:00
|
|
|
+mkdir -p $(BUILD_DIR)/$(1) && $(MAKE) -C $(BUILD_DIR)/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1)
|
2016-02-19 19:17:44 +00:00
|
|
|
endef
|
|
|
|
|
2015-10-14 01:08:31 +00:00
|
|
|
binary-arch: install-kbuild install-usbip install-liblockdep
|
2015-09-29 13:12:43 +00:00
|
|
|
ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),)
|
2015-08-03 23:46:29 +00:00
|
|
|
binary-arch: install-perf
|
2011-09-13 14:44:15 +00:00
|
|
|
endif
|
2015-09-29 13:12:51 +00:00
|
|
|
ifneq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),)
|
2015-07-16 18:59:30 +00:00
|
|
|
binary-arch: install-hyperv-daemons
|
|
|
|
endif
|
2006-03-28 21:46:39 +00:00
|
|
|
|
2015-10-14 01:08:31 +00:00
|
|
|
binary-indep: install-lockdep
|
|
|
|
|
2015-12-10 02:44:23 +00:00
|
|
|
build-arch: $(STAMPS_DIR)/build
|
|
|
|
|
|
|
|
build-indep:
|
2006-03-28 21:46:39 +00:00
|
|
|
|
2014-07-29 19:18:10 +00:00
|
|
|
$(STAMPS_DIR)/build:
|
2016-02-19 19:17:44 +00:00
|
|
|
$(call submake,.)
|
2015-10-14 01:05:02 +00:00
|
|
|
mkdir -p $(STAMPS_DIR)
|
2006-03-28 21:46:39 +00:00
|
|
|
touch '$@'
|
|
|
|
|
|
|
|
install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION)
|
|
|
|
install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME)
|
2016-02-22 23:39:54 +00:00
|
|
|
install-kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME)
|
|
|
|
install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
|
2006-03-28 21:46:39 +00:00
|
|
|
install-kbuild: $(STAMPS_DIR)/build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-06-28 18:48:45 +00:00
|
|
|
dh_prep
|
2016-02-22 23:39:54 +00:00
|
|
|
$(call submake,scripts) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR)
|
|
|
|
dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME)
|
2006-03-28 21:46:39 +00:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2015-08-03 23:46:29 +00:00
|
|
|
install-perf: PACKAGE_NAME = linux-perf-$(VERSION)
|
|
|
|
install-perf: DH_OPTIONS = -p$(PACKAGE_NAME)
|
|
|
|
install-perf: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
|
|
|
|
install-perf: $(STAMPS_DIR)/build
|
2011-09-26 13:23:11 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-06-28 18:48:45 +00:00
|
|
|
dh_prep
|
2016-02-19 19:17:44 +00:00
|
|
|
$(call submake,tools/perf) install DESTDIR=$(DIR)
|
2011-09-26 13:23:11 +00:00
|
|
|
dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/
|
|
|
|
dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/
|
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2012-06-20 06:04:10 +00:00
|
|
|
install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip
|
2015-12-10 02:44:23 +00:00
|
|
|
install-usbip: DIR = $(CURDIR)/debian/usbip-tmp
|
2016-02-19 20:05:58 +00:00
|
|
|
install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/config.h)
|
2012-06-20 06:04:10 +00:00
|
|
|
install-usbip: $(STAMPS_DIR)/build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-06-28 18:48:45 +00:00
|
|
|
dh_prep
|
2016-02-19 19:17:44 +00:00
|
|
|
$(call submake,tools/usb/usbip) install DESTDIR=$(DIR)
|
2015-12-10 02:44:23 +00:00
|
|
|
dh_install --sourcedir=$(DIR)
|
2012-06-20 06:04:10 +00:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_lintian
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
2015-06-28 19:30:14 +00:00
|
|
|
test -n "$(VERSION)" -a -n "$(DEB_VERSION)"
|
|
|
|
dh_gencontrol -- -v$(VERSION)+$(DEB_VERSION)
|
2012-06-20 06:04:10 +00:00
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
2015-06-28 18:44:20 +00:00
|
|
|
|
|
|
|
install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons
|
|
|
|
install-hyperv-daemons: DH_OPTIONS = -p$(PACKAGE_NAME)
|
|
|
|
install-hyperv-daemons: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
|
|
|
|
install-hyperv-daemons: $(STAMPS_DIR)/build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-06-28 18:48:45 +00:00
|
|
|
dh_prep
|
2016-02-19 19:17:44 +00:00
|
|
|
$(call submake,tools/hv) install DESTDIR=$(DIR)
|
2015-06-28 18:44:20 +00:00
|
|
|
dh_install
|
2016-02-02 16:54:54 +00:00
|
|
|
for service in fcopy kvp vss; do \
|
|
|
|
install -D -m755 debian/hyperv-daemons.hv-$$service-daemon.init \
|
|
|
|
$(DIR)/etc/init.d/hyperv-daemons.hv-$$service-daemon \
|
|
|
|
|| break; \
|
|
|
|
done
|
2015-06-28 18:44:20 +00:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_systemd_enable
|
2016-02-02 16:54:54 +00:00
|
|
|
for service in fcopy kvp vss; do \
|
|
|
|
dh_installinit --name hyperv-daemons.hv-$$service-daemon \
|
|
|
|
--onlyscripts \
|
|
|
|
|| break; \
|
|
|
|
done
|
2015-06-28 18:44:20 +00:00
|
|
|
dh_systemd_start
|
|
|
|
dh_lintian
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
2015-08-13 18:48:12 +00:00
|
|
|
|
2015-10-14 01:08:31 +00:00
|
|
|
install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev
|
2015-12-10 02:44:23 +00:00
|
|
|
install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp
|
2015-10-14 01:08:31 +00:00
|
|
|
install-liblockdep: $(STAMPS_DIR)/build
|
2015-08-13 18:48:12 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_prep
|
2016-02-19 19:17:44 +00:00
|
|
|
$(call submake,tools/lib/lockdep) install DESTDIR=$(DIR)
|
2015-12-10 02:44:23 +00:00
|
|
|
env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \
|
2015-08-13 18:48:12 +00:00
|
|
|
'usr/lib/*/liblockdep.so.*'
|
2015-12-10 02:44:23 +00:00
|
|
|
dh_install --sourcedir=$(DIR)
|
2015-08-13 18:48:12 +00:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
env -u DH_OPTIONS dh_makeshlibs -pliblockdep$(VERSION) \
|
|
|
|
liblockdep$(VERSION)
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
2015-10-14 01:08:31 +00:00
|
|
|
|
2015-12-10 02:44:23 +00:00
|
|
|
install-lockdep: PACKAGE_NAME = lockdep
|
|
|
|
install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME)
|
|
|
|
install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
|
|
|
|
install-lockdep:
|
2015-10-14 01:08:31 +00:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_prep
|
2015-12-10 02:44:23 +00:00
|
|
|
dh_installdirs
|
|
|
|
# Upstream lockdep preload script is not suitable for installation
|
2016-02-19 20:05:58 +00:00
|
|
|
sed 's/@VERSION@/$(VERSION)/' debian/rules.d/tools/lib/lockdep/lockdep.in \
|
2015-12-10 02:44:23 +00:00
|
|
|
> $(DIR)/usr/bin/lockdep
|
|
|
|
chmod 755 $(DIR)/usr/bin/lockdep
|
2015-10-14 01:08:31 +00:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|