You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

#===============================================================================
# export variable
#===============================================================================
BUILD_DIR := $(SDK_DIR)/build
-include $(BUILD_DIR)/base.mak
#===============================================================================
# local variable
#===============================================================================
PKGNAME := xbug_$(CFG_SOCT_CPU_ARCH)
DEBNAME := xbug_$(DEB_PKG_VERSION)_$(CFG_SOCT_CPU_ARCH)
DEBHOME := $(SOCT_OUT_DIR)/deb
PKGHOME := $(DEBHOME)/$(PKGNAME)
#===============================================================================
# rules
#===============================================================================
.PHONY: xbug_deb_pkg xbug_deb_clean
xbug_deb_pkg:
$(AT)mkdir -p $(PKGHOME)/DEBIAN
$(AT)mkdir -p $(PKGHOME)/usr/bin/xbugs
$(AT)cp $(CURDIR)/control $(PKGHOME)/DEBIAN/
$(AT)sed -i 's/Version: 1.0.0/Version: $(DEB_PKG_VERSION)/g' $(PKGHOME)/DEBIAN/control
$(AT)cp $(CURDIR)/xbug+ $(PKGHOME)/usr/bin/
$(AT)cp -r $(CURDIR)/common $(PKGHOME)/usr/bin/xbugs
$(AT)cp -r $(CURDIR)/special $(PKGHOME)/usr/bin/xbugs
$(AT)rm -f $(DEBHOME)/$(DEBNAME).deb
$(AT)fakeroot dpkg -b $(PKGHOME) $(DEBHOME)/$(DEBNAME).deb
xbug_deb_clean:
$(AT)rm -rf $(PKGHOME)
$(AT)rm -f $(DEBHOME)/$(DEBNAME).deb