diff --git a/package/linux/deb.mk b/package/linux/deb.mk index a7229b818..e862fc87c 100644 --- a/package/linux/deb.mk +++ b/package/linux/deb.mk @@ -8,6 +8,7 @@ DEB_REV := 0$(DEB_DIST)1 endif DEB_NAME := $(ORG_SMALL_NAME) DEB_ORIG_SRC := $(PACKAGE_DIR)/$(DEB_NAME)_$(UPSTREAM_VER).orig.tar.gz +DEB_ORIG_FW := $(PACKAGE_DIR)/$(DEB_NAME)_$(UPSTREAM_VER).orig-firmware.tar.gz DEB_PACKAGE_DIR := $(PACKAGE_DIR)/$(DEB_NAME)-$(UPSTREAM_VER) DEB_ARCH := $(shell dpkg --print-architecture) DEB_PACKAGE_NAME := $(DEB_NAME)_$(UPSTREAM_VER)-$(DEB_REV)_$(DEB_ARCH) @@ -39,6 +40,7 @@ PACKAGE_DEPS_SED := s/python.*/python/;s/{misc:Depends}.*/{misc:Depends}/; package: debian @$(ECHO) "Building Linux package, please wait..." $(V1) sed -i -e "$(PACKAGE_DEPS_SED)" debian/control + $(V1) sed -i -e 's/WITH_PREBUILT.*firmware//' debian/rules $(V1) dpkg-buildpackage -b -us -uc -nc $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR) $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR) @@ -61,8 +63,12 @@ package_src: $(DEB_ORIG_SRC_NAME) $(DEB_PACKAGE_DIR) $(DEB_ORIG_SRC): $(DIST_TAR_GZ) | $(PACKAGE_DIR) $(V1) cp $(DIST_TAR_GZ) $(DEB_ORIG_SRC) -$(DEB_PACKAGE_DIR): $(DEB_ORIG_SRC) debian | $(PACKAGE_DIR) +$(DEB_ORIG_FW): $(FW_DIST_TAR_GZ) | $(PACKAGE_DIR) + $(V1) cp $(FW_DIST_TAR_GZ) $(DEB_ORIG_FW) + +$(DEB_PACKAGE_DIR): $(DEB_ORIG_SRC) $(DEB_ORIG_FW) debian | $(PACKAGE_DIR) $(V1) tar -xf $(DEB_ORIG_SRC) -C $(PACKAGE_DIR) + $(V1) tar -xf $(DEB_ORIG_FW) -C $(PACKAGE_DIR)/$(PACKAGE_NAME) $(V1) mv debian $(PACKAGE_DIR)/$(PACKAGE_NAME) $(V1) rm -rf $(DEB_PACKAGE_DIR) && mv $(PACKAGE_DIR)/$(PACKAGE_NAME) $(DEB_PACKAGE_DIR) diff --git a/package/linux/debian/control b/package/linux/debian/control index 64ee9e6c9..96a668ddd 100644 --- a/package/linux/debian/control +++ b/package/linux/debian/control @@ -2,7 +2,7 @@ Source: Section: electronics Priority: optional Maintainer: The LibrePilot Project <> -Build-Depends: debhelper (>= 9), libudev-dev, libusb-1.0-0-dev, libsdl1.2-dev, python, gcc-arm-none-eabi (>=4.9), qt5-default, qttools5-dev-tools, libqt5svg5-dev, qtdeclarative5-dev, qml-module-qtquick-controls, libqt5serialport5-dev, qtmultimedia5-dev, qtscript5-dev, libqt5opengl5-dev +Build-Depends: debhelper (>= 9), libudev-dev, libusb-1.0-0-dev, libsdl1.2-dev, python, qt5-default, qttools5-dev-tools, libqt5svg5-dev, qtdeclarative5-dev, qml-module-qtquick-controls, libqt5serialport5-dev, qtmultimedia5-dev, qtscript5-dev, libqt5opengl5-dev Standards-Version: 3.9.5 Homepage: Vcs-Git: diff --git a/package/linux/debian/rules b/package/linux/debian/rules index 6b2ce35ee..4f29ac36e 100755 --- a/package/linux/debian/rules +++ b/package/linux/debian/rules @@ -12,7 +12,7 @@ export DH_OPTIONS dh $@ override_dh_auto_build: - dh_auto_build -- opfw_resource gcs + dh_auto_build -- WITH_PREBUILT_FW=$(CURDIR)/firmware opfw_resource gcs override_dh_auto_install: dh_auto_install -- prefix=/usr