mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
[OP-674] Attempt to fix Linux packaging dependencies
This commit is contained in:
parent
7ac258352a
commit
78c002e911
@ -2,30 +2,23 @@
|
||||
# Linux-specific packaging
|
||||
#
|
||||
|
||||
define CP_DEB_FILES_TEMPLATE
|
||||
.PHONY: $(2)/$(1)
|
||||
$(2)/$(1): $(3)/$(1)
|
||||
$(V1)cp -a $$< $$@
|
||||
endef
|
||||
|
||||
# Update this number for every formal release. The Deb packaging system relies on this to know to update a
|
||||
# package or not. Otherwise, the user has to uninstall first.
|
||||
# Until we do that, package name does NOT include $(VERNUM) and uses $(PACKAGE_LBL) only
|
||||
VERNUM := 0.1.0
|
||||
VERSION_FULL := $(VERNUM)-$(PACKAGE_LBL)
|
||||
|
||||
FLIGHT_FW := coptercontrol revolution
|
||||
|
||||
DEB_BUILD_DIR := $(ROOT_DIR)/debian
|
||||
|
||||
SED_DATE_STRG = $(shell date -R)
|
||||
SED_SCRIPT = s/<VERSION>/$(VERSION_FULL)/;s/<DATE>/$(SED_DATE_STRG)/
|
||||
SED_SCRIPT = s/<VERSION>/$(PACKAGE_LBL)/;s/<DATE>/$(SED_DATE_STRG)/
|
||||
|
||||
DEB_CFG_CMN := $(ROOT_DIR)/package/linux/deb_common
|
||||
DEB_CFG_CMN_FILES := $(shell ls $(DEB_CFG_CMN))
|
||||
DEB_CFG_I386_DIR := $(ROOT_DIR)/package/linux/deb_i386
|
||||
DEB_CFG_I386_FILES := $(shell ls $(DEB_CFG_I386_DIR))
|
||||
DEB_CFG_AMD64_DIR := $(ROOT_DIR)/package/linux/deb_amd64
|
||||
DEB_CFG_CMN_FILES := $(shell ls $(DEB_CFG_CMN))
|
||||
DEB_CFG_I386_FILES := $(shell ls $(DEB_CFG_I386_DIR))
|
||||
DEB_CFG_AMD64_FILES := $(shell ls $(DEB_CFG_AMD64_DIR))
|
||||
|
||||
DEB_PLATFORM := amd64
|
||||
DEB_MACHINE_DIR := $(DEB_CFG_AMD64_DIR)
|
||||
DEB_MACHINE_FILES := $(DEB_CFG_AMD64_FILES)
|
||||
@ -35,42 +28,36 @@ ifneq ($(MACHINE_TYPE), x86_64)
|
||||
DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR)
|
||||
DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES)
|
||||
endif
|
||||
DEB_PACKAGE_NAME := openpilot_$(PACKAGE_LBL)_$(DEB_PLATFORM)
|
||||
|
||||
ALL_DEB_FILES = $(foreach f, $(DEB_CFG_CMN_FILES), $(DEB_BUILD_DIR)/$(f))
|
||||
ALL_DEB_FILES += $(foreach f, $(DEB_MACHINE_FILES), $(DEB_BUILD_DIR)/$(f))
|
||||
|
||||
DEB_PACKAGE_NAME := openpilot_$(VERSION_FULL)_$(DEB_PLATFORM)
|
||||
|
||||
linux_deb_package: deb_build gcs
|
||||
@echo $@ starting
|
||||
cd .. && dpkg-buildpackage -b -us -uc
|
||||
linux_deb_package: $(ALL_DEB_FILES) gcs package_flight
|
||||
$(V1) echo "Building Linux package, please wait..."
|
||||
$(V1) mkdir -p $(DEB_BUILD_DIR)
|
||||
$(V1) $(shell echo $(FW_DIR) > $(BUILD_DIR)/package_dir)
|
||||
$(V1) sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
|
||||
$(V1) cd .. && dpkg-buildpackage -b -us -uc
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)
|
||||
$(V1) rm -rf $(DEB_BUILD_DIR)
|
||||
|
||||
deb_build: | $(DEB_BUILD_DIR) $(ALL_DEB_FILES) $(BUILD_DIR)/build
|
||||
@echo $@ starting
|
||||
$(V1)$(shell echo $(FW_DIR) > $(BUILD_DIR)/package_dir)
|
||||
$(V1)sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
|
||||
$(ALL_DEB_FILES): | uavobjects
|
||||
|
||||
$(BUILD_DIR)/build: package_flight
|
||||
|
||||
$(DEB_BUILD_DIR):
|
||||
@echo $@ starting
|
||||
$(V1)mkdir -p $(DEB_BUILD_DIR)
|
||||
define CP_DEB_FILES_TEMPLATE
|
||||
.PHONY: $(2)/$(1)
|
||||
$(2)/$(1): $(3)/$(1)
|
||||
$(V1) mkdir -p $(2)
|
||||
$(V1) cp -a $$< $$@
|
||||
endef
|
||||
|
||||
$(foreach cpfile, $(DEB_CFG_CMN_FILES), $(eval $(call CP_DEB_FILES_TEMPLATE,$(cpfile),$(DEB_BUILD_DIR),$(DEB_CFG_CMN))))
|
||||
|
||||
$(foreach cpfile, $(DEB_MACHINE_FILES), $(eval $(call CP_DEB_FILES_TEMPLATE,$(cpfile),$(DEB_BUILD_DIR),$(DEB_MACHINE_DIR))))
|
||||
|
||||
gcs: uavobjects
|
||||
@echo "Linux Package Make of GCS."
|
||||
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
|
||||
|
||||
identify:
|
||||
@echo ""
|
||||
@echo "We are in the Linux Package Make system."
|
||||
@echo ""
|
||||
ground_package: | linux_deb_package
|
||||
|
||||
ground_package: | identify linux_deb_package
|
||||
|
||||
.PHONY: identify gcs ground_package linux_deb_package deb_build $(DEB_BUILD_DIR)
|
||||
.PHONY: gcs ground_package linux_deb_package
|
||||
|
@ -11,5 +11,5 @@ Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
|
||||
Package: openpilot
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: OpenPilot GCS & FW
|
||||
OpenPilot GCS and Firmware for CopterControl (CC) board.
|
||||
Description: OpenPilot GCS
|
||||
OpenPilot Ground Control Station software
|
||||
|
@ -11,5 +11,5 @@ Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
|
||||
Package: openpilot
|
||||
Architecture: i386
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: OpenPilot GCS & FW
|
||||
OpenPilot GCS and Firmware for CopterControl (CC) board.
|
||||
Description: OpenPilot GCS
|
||||
OpenPilot Ground Control Station software
|
||||
|
Loading…
Reference in New Issue
Block a user