diff --git a/Makefile b/Makefile index f18e3efbd..97ff2d923 100644 --- a/Makefile +++ b/Makefile @@ -792,18 +792,10 @@ PACKAGE_NAME := OpenPilot PACKAGE_SEP := - PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL) -# Source distribution is never dirty because it uses git archive -DIST_NAME := $(DIST_DIR)/$(subst dirty-,,$(PACKAGE_FULL_NAME)).tar - -.PHONY: package - include $(ROOT_DIR)/package/$(UNAME).mk -package: all_fw all_ground uavobjects_matlab | $(PACKAGE_DIR) -ifneq ($(GCS_BUILD_CONF),release) - # We can only package release builds - $(error Packaging is currently supported for release builds only) -endif +# Source distribution is never dirty because it uses git archive +DIST_NAME := $(DIST_DIR)/$(subst dirty-,,$(PACKAGE_FULL_NAME)).tar ############################## # diff --git a/package/Darwin.mk b/package/Darwin.mk index eb6cbe373..a9035a96e 100644 --- a/package/Darwin.mk +++ b/package/Darwin.mk @@ -7,7 +7,11 @@ ifndef OPENPILOT_IS_COOL endif .PHONY: package -package: +package: openpilotgcs uavobjects_matlab | $(PACKAGE_DIR) +ifneq ($(GCS_BUILD_CONF),release) + # We can only package release builds + $(error Packaging is currently supported for release builds only) +endif ( \ ROOT_DIR="$(ROOT_DIR)" \ BUILD_DIR="$(BUILD_DIR)" \ diff --git a/package/Linux.mk b/package/Linux.mk index 456173131..82882338e 100644 --- a/package/Linux.mk +++ b/package/Linux.mk @@ -42,12 +42,10 @@ PACKAGE_DEPS_SED := s/python.*/python/;s/{misc:Depends}.*/{misc:Depends}/; .PHONY: package package: debian @$(ECHO) "Building Linux package, please wait..." - # Override clean and build because OP has already performed them. - $(V1) printf "override_dh_auto_clean:\noverride_dh_auto_build:\n\t#\n" >> debian/rules $(V1) sed -i -e "$(PACKAGE_DEPS_SED)" debian/control - $(V1) dpkg-buildpackage -b -us -uc - $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(PACKAGE_DIR) - $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(PACKAGE_DIR) + $(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) $(V1) rm -r debian .PHONY: debian diff --git a/package/Windows.mk b/package/Windows.mk index 76227d15b..5ded917b6 100644 --- a/package/Windows.mk +++ b/package/Windows.mk @@ -15,7 +15,11 @@ NSIS_TEMPLATE := $(NSIS_WINX86)/openpilotgcs.tpl NSIS_HEADER := $(OPGCSSYNTHDIR)/openpilotgcs.nsh .PHONY: package -package: +package: openpilotgcs uavobjects_matlab | $(PACKAGE_DIR) +ifneq ($(GCS_BUILD_CONF),release) + # We can only package release builds + $(error Packaging is currently supported for release builds only) +endif $(V1) mkdir -p "$(dir $(NSIS_HEADER))" $(VERSION_CMD) \ --template='$(NSIS_TEMPLATE)' \ diff --git a/package/linux/debian/changelog b/package/linux/debian/changelog index fe2d82497..fb139a1f1 100644 --- a/package/linux/debian/changelog +++ b/package/linux/debian/changelog @@ -1,5 +1,5 @@ openpilot () ; urgency=low - * Release from upstream Git (testing - unstable) + * Release from upstream Git repository -- James Duley diff --git a/package/linux/debian/rules b/package/linux/debian/rules index 1c0a922f0..80c5c3019 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 -- all + dh_auto_build -- opfw_resource openpilotgcs override_dh_auto_install: dh_auto_install -- prefix=/usr