$(eval $(call import.MODULE.defs,PKG,pkg))

PKG.in/  = $(SRC/)pkg/
PKG.out/ = $(BUILD/)pkg/

PKG.basename            = $(HB.name)-$(HB.version)
PKG.src.tar.bz2         = $(PKG.out/)$(PKG.basename).tar.bz2
PKG.src-contrib.tar.bz2 = $(PKG.out/)$(PKG.basename)-contrib.tar.bz2

STAGE.out/     = $(BUILD/)stage/
STAGE.out.src/ = $(STAGE.out/)src/

###############################################################################

define STAGE.doc
	$(MKDIR.exe) -p $(1)doc
	$(CP.exe) $(SRC/)AUTHORS $(1)doc
	$(CP.exe) $(SRC/)COPYING $(1)doc
	$(CP.exe) $(SRC/)CREDITS $(1)doc
	$(CP.exe) $(SRC/)NEWS $(1)doc
	$(CP.exe) $(SRC/)THANKS $(1)doc
	$(CP.exe) $(SRC/)TRANSLATIONS $(1)doc
endef

###############################################################################

BUILD.out += $(PKG.src.tar.bz2)

###############################################################################

## include optional platform packaging
-include $(SRC/)pkg/$(BUILD.system)/module.defs