1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-1695 Ubuntu PPA: add debian target

This commit is contained in:
James Duley 2015-01-31 16:15:53 +13:00
parent 5f1f156d10
commit 61395f44fc

View File

@ -7,8 +7,7 @@ ifndef OPENPILOT_IS_COOL
endif
DEB_VER := $(subst RELEASE-,,$(PACKAGE_LBL))-1
DEB_DIR := $(ROOT_DIR)/package/linux/debian
DEB_BUILD_DIR := $(ROOT_DIR)/debian
DEB_DIR := package/linux/debian
SED_DATE_STRG = $(shell date -R)
SED_SCRIPT = s/<VERSION>/$(DEB_VER)/;s/<DATE>/$(SED_DATE_STRG)/
@ -17,14 +16,17 @@ DEB_ARCH := $(shell dpkg --print-architecture)
DEB_PACKAGE_NAME := openpilot_$(DEB_VER)_$(DEB_ARCH)
.PHONY: package
package:
package: debian
$(V1) echo "Building Linux package, please wait..."
$(V1) cp -rL $(DEB_DIR) $(DEB_BUILD_DIR)
$(V1) sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
$(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) rm -rf $(DEB_BUILD_DIR)
$(V1) rm -r debian
debian: $(DEB_DIR)
$(V1) cp -rL $(DEB_DIR) debian
$(V1) sed -i -e "$(SED_SCRIPT)" debian/changelog
##############################
#