1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1666_deb_tidy: removes spilt arch control file

This commit is contained in:
James Duley 2015-01-09 11:05:29 +13:00
parent 059b52597b
commit f3ebed43ad
26 changed files with 10 additions and 49 deletions

View File

@ -11,49 +11,25 @@ endif
# Until we do that, package name does NOT include $(VERNUM) and uses $(PACKAGE_LBL) only # Until we do that, package name does NOT include $(VERNUM) and uses $(PACKAGE_LBL) only
VERNUM := 0.1.0 VERNUM := 0.1.0
VERSION_FULL := $(VERNUM)-$(PACKAGE_LBL) VERSION_FULL := $(VERNUM)-$(PACKAGE_LBL)
DEB_DIR := $(ROOT_DIR)/package/linux/debian
DEB_BUILD_DIR := $(ROOT_DIR)/debian DEB_BUILD_DIR := $(ROOT_DIR)/debian
SED_DATE_STRG = $(shell date -R) SED_DATE_STRG = $(shell date -R)
SED_SCRIPT = s/<VERSION>/$(VERNUM)/;s/<DATE>/$(SED_DATE_STRG)/ SED_SCRIPT = s/<VERSION>/$(VERNUM)/;s/<DATE>/$(SED_DATE_STRG)/
DEB_CFG_CMN := $(ROOT_DIR)/package/linux/deb_common
DEB_CFG_I386_DIR := $(ROOT_DIR)/package/linux/deb_i386
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_PLATFORM := amd64
DEB_MACHINE_DIR := $(DEB_CFG_AMD64_DIR)
DEB_MACHINE_FILES := $(DEB_CFG_AMD64_FILES)
MACHINE_TYPE := $(shell uname -m) MACHINE_TYPE := $(shell uname -m)
ifneq ($(MACHINE_TYPE), x86_64) ifneq ($(MACHINE_TYPE), x86_64)
DEB_PLATFORM := i386 DEB_PLATFORM := i386
DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR)
DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES)
endif endif
DEB_PACKAGE_NAME := openpilot_$(VERNUM)_$(DEB_PLATFORM) DEB_PACKAGE_NAME := openpilot_$(VERNUM)_$(DEB_PLATFORM)
FULL_PACKAGE_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)$(PACKAGE_SEP)$(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))
.PHONY: package .PHONY: package
package: $(ALL_DEB_FILES) package:
$(V1) echo "Building Linux package, please wait..." $(V1) echo "Building Linux package, please wait..."
$(V1) mkdir -p $(DEB_BUILD_DIR) $(V1) cp -r $(DEB_DIR) $(DEB_BUILD_DIR)
$(V1)sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog $(V1)sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
$(V1) cd .. && dpkg-buildpackage -b -us -uc $(V1) cd .. && dpkg-buildpackage -b -us -uc
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)/$(FULL_PACKAGE_NAME).deb $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)/$(DEB_PACKAGE_NAME).deb
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)/$(FULL_PACKAGE_NAME).changes $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)/$(DEB_PACKAGE_NAME).changes
$(V1) rm -rf $(DEB_BUILD_DIR) $(V1) rm -rf $(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))))

View File

@ -1,15 +0,0 @@
Source: openpilot
Section: unknown
Priority: extra
Maintainer: naiiawah <naiiawah@openpilot.org>
Build-Depends: debhelper (>= 7.0.50~)
Standards-Version: 3.8.4
Homepage: http://www.openpilot.org
Vcs-Git: git://git.openpilot.org/OpenPilot.git
Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
Package: openpilot
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenPilot GCS
OpenPilot Ground Control Station software

View File

@ -1,15 +1,15 @@
Source: openpilot Source: openpilot
Section: unknown Section: unknown
Priority: extra Priority: optional
Maintainer: naiiawah <naiiawah@openpilot.org> Maintainer: James Duley <jagduley@gmail.com>
Build-Depends: debhelper (>= 7.0.50~) Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.8.4 Standards-Version: 3.9.4
Homepage: http://www.openpilot.org Homepage: http://www.openpilot.org
Vcs-Git: git://git.openpilot.org/OpenPilot.git Vcs-Git: git://git.openpilot.org/OpenPilot.git
Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
Package: openpilot Package: openpilot
Architecture: i386 Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenPilot GCS Description: OpenPilot GCS
OpenPilot Ground Control Station software OpenPilot Ground Control Station software