diff --git a/makefile b/makefile index b2f6486..10648d7 100644 --- a/makefile +++ b/makefile @@ -35,8 +35,8 @@ PKG_NAME := $(PROJECT_ID)_$(VERSION)_$(GOOS)-$(GOARCH) DIST_FILE := $(PKG_NAME)$(DIST_EXT) PKG_ARCH := $(GOARCH) -ifeq ($(GOARCH),arm) - PKG_ARH := armv7l +ifeq ($(PKG_ARCH),arm) + PKG_ARCH = armhf endif GREEN := $(shell tput -Txterm setaf 2) @@ -95,23 +95,22 @@ DEB_NAME := $(PROJECT_ID)_$(VERSION_NUMBER)-1_$(PKG_ARCH) pkg-deb: ## Build debian package @rm -rf $(TMPDIR) @mkdir -p $(TMPDIR)/$(DEB_NAME)/usr/bin - @mkdir -p $(TMPDIR)/$(DEB_NAME)/debian @mkdir -p $(TMPDIR)/$(DEB_NAME)/DEBIAN @cp -a $(BINDIR)/* $(TMPDIR)/$(DEB_NAME)/usr/bin/ @sed -e "s/VERSION/$(VERSION_NUMBER)/g" \ $(CURDIR)/build/package/debian/changelog.tpl \ - > $(TMPDIR)/$(DEB_NAME)/changelog + > $(TMPDIR)/changelog @sed -e "s/ARCH/$(PKG_ARCH)/g" $(CURDIR)/build/package/debian/control.tpl \ - > $(TMPDIR)/$(DEB_NAME)/control + > $(TMPDIR)/control DEB_HOST_ARCH=$(PKG_ARCH) dpkg-gencontrol -v$(VERSION_NUMBER)-1 \ - -c$(TMPDIR)/$(DEB_NAME)/control \ - -l$(TMPDIR)/$(DEB_NAME)/changelog \ - -f$(TMPDIR)/$(DEB_NAME)/debian/files -Ptmp/$(DEB_NAME) + -c$(TMPDIR)/control \ + -l$(TMPDIR)/changelog \ + -f$(TMPDIR)/$(DEB_NAME)/DEBIAN/files -Ptmp/$(DEB_NAME) dpkg-deb --build --root-owner-group $(TMPDIR)/$(DEB_NAME) dpkg-genchanges --build=binary \ - -c$(TMPDIR)/$(DEB_NAME)/control \ - -l$(TMPDIR)/$(DEB_NAME)/changelog \ - -f$(TMPDIR)/$(DEB_NAME)/debian/files \ + -c$(TMPDIR)/control \ + -l$(TMPDIR)/changelog \ + -f$(TMPDIR)/$(DEB_NAME)/DEBIAN/files \ -u$(TMPDIR) -O$(OUTDIR)/$(DEB_NAME).changes @mv $(TMPDIR)/*.deb $(OUTDIR)/ @$(ECHO_CMD) "pkg-deb\t\t${GREEN}[OK]${RESET}"