mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
LP-80 extend linux packaging: reworked dist
Change-Id: Icd7b552d67dfa1ffd32172b78e283e6044bad47d
This commit is contained in:
parent
b2598ff25a
commit
a5cd918de7
55
Makefile
55
Makefile
@ -735,10 +735,39 @@ PACKAGE_SEP := -
|
|||||||
PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)
|
PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)
|
||||||
|
|
||||||
# Source distribution is never dirty because it uses git archive
|
# Source distribution is never dirty because it uses git archive
|
||||||
DIST_NAME := $(DIST_DIR)/$(subst dirty-,,$(PACKAGE_FULL_NAME)).tar
|
DIST_NAME := $(subst -dirty,,$(PACKAGE_FULL_NAME))
|
||||||
|
DIST_TAR := $(DIST_DIR)/$(DIST_NAME).tar
|
||||||
|
DIST_TAR_GZ := $(DIST_TAR).gz
|
||||||
|
DIST_VER_INFO := $(DIST_DIR)/version-info.json
|
||||||
|
|
||||||
include $(ROOT_DIR)/package/$(UNAME).mk
|
include $(ROOT_DIR)/package/$(UNAME).mk
|
||||||
|
|
||||||
|
##############################
|
||||||
|
#
|
||||||
|
# Source for distribution
|
||||||
|
#
|
||||||
|
##############################
|
||||||
|
$(DIST_VER_INFO): .git/index | $(DIST_DIR)
|
||||||
|
$(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)"
|
||||||
|
|
||||||
|
$(DIST_TAR): $(DIST_VER_INFO) .git/index | $(DIST_DIR)
|
||||||
|
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR))"
|
||||||
|
$(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_TAR)" HEAD
|
||||||
|
$(V1) tar --append --file="$(DIST_TAR)" \
|
||||||
|
--transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
|
||||||
|
$(call toprel, "$(DIST_VER_INFO)")
|
||||||
|
|
||||||
|
$(DIST_TAR_GZ): $(DIST_TAR)
|
||||||
|
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR_GZ))"
|
||||||
|
$(V1) gzip -kf "$(DIST_TAR)"
|
||||||
|
|
||||||
|
.PHONY: dist_tar_gz
|
||||||
|
dist_tar_gz: $(DIST_TAR_GZ)
|
||||||
|
|
||||||
|
.PHONY: dist
|
||||||
|
dist: dist_tar_gz
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
#
|
#
|
||||||
# Source code formatting
|
# Source code formatting
|
||||||
@ -813,30 +842,6 @@ build-info: | $(BUILD_DIR)
|
|||||||
--template="make/templates/$@.txt" \
|
--template="make/templates/$@.txt" \
|
||||||
--outfile="$(BUILD_DIR)/$@.txt"
|
--outfile="$(BUILD_DIR)/$@.txt"
|
||||||
|
|
||||||
##############################
|
|
||||||
#
|
|
||||||
# Source for distribution
|
|
||||||
#
|
|
||||||
##############################
|
|
||||||
|
|
||||||
DIST_VER_INFO := $(DIST_DIR)/version-info.json
|
|
||||||
|
|
||||||
$(DIST_VER_INFO): .git/index | $(DIST_DIR)
|
|
||||||
$(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)"
|
|
||||||
|
|
||||||
|
|
||||||
$(DIST_NAME).gz: $(DIST_VER_INFO) .git/index | $(DIST_DIR)
|
|
||||||
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_NAME).gz)"
|
|
||||||
$(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_NAME)" HEAD
|
|
||||||
$(V1) tar --append --file="$(DIST_NAME)" \
|
|
||||||
--transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
|
|
||||||
$(call toprel, "$(DIST_VER_INFO)")
|
|
||||||
$(V1) gzip -f "$(DIST_NAME)"
|
|
||||||
|
|
||||||
.PHONY: dist
|
|
||||||
dist: $(DIST_NAME).gz
|
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
#
|
#
|
||||||
# Config
|
# Config
|
||||||
|
@ -67,8 +67,8 @@ endif
|
|||||||
package_src: $(DEB_ORIG_SRC_NAME) $(DEB_PACKAGE_DIR)
|
package_src: $(DEB_ORIG_SRC_NAME) $(DEB_PACKAGE_DIR)
|
||||||
$(V1) cd $(DEB_PACKAGE_DIR) && dpkg-buildpackage -S -us -uc
|
$(V1) cd $(DEB_PACKAGE_DIR) && dpkg-buildpackage -S -us -uc
|
||||||
|
|
||||||
$(DEB_ORIG_SRC): $(DIST_NAME).gz | $(PACKAGE_DIR)
|
$(DEB_ORIG_SRC): $(DIST_TAR_GZ) | $(PACKAGE_DIR)
|
||||||
$(V1) cp $(DIST_NAME).gz $(DEB_ORIG_SRC)
|
$(V1) cp $(DIST_TAR_GZ) $(DEB_ORIG_SRC)
|
||||||
|
|
||||||
$(DEB_PACKAGE_DIR): $(DEB_ORIG_SRC) debian | $(PACKAGE_DIR)
|
$(DEB_PACKAGE_DIR): $(DEB_ORIG_SRC) debian | $(PACKAGE_DIR)
|
||||||
$(V1) tar -xf $(DEB_ORIG_SRC) -C $(PACKAGE_DIR)
|
$(V1) tar -xf $(DEB_ORIG_SRC) -C $(PACKAGE_DIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user