summaryrefslogtreecommitdiffstats
path: root/pkg/module.rules
blob: e3d82254517991fd3af1321b2e2e8035f5271ce3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$(eval $(call import.MODULE.rules,PKG))

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

.PHONY: pkg.create

pkg.create:: $(PKG.src.tar.bz2)

pkg.createx:: pkg.create $(PKG.src-contrib.tar.bz2)

pkg.clean:
	$(RM.exe) -fr $(STAGE.out/)
	$(RM.exe) -fr $(PKG.out/)

$(PKG.src.tar.bz2): | $(dir $(PKG.src.tar.bz2))
$(PKG.src.tar.bz2): $(STAGE.out.src.dist/)
	$(TAR.exe) cjf $@ -C $(STAGE.out.src/) $(PKG.basename)

$(STAGE.out.src.dist/):
	$(MKDIR.exe) -p $(STAGE.out.src/)
	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)
	$(SRC/)scripts/repo-info.sh $(SRC/) $(GIT.exe) > $@/version.txt

$(PKG.src-contrib.tar.bz2):
	$(TAR.exe) cjf $@ -C $(CONTRIB.download/) \
	    $(foreach f,$(MODULES.NAMES),$(notdir $($f.FETCH.tar)))

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

## include optional platform packaging
-include $(SRC/)pkg/$(HOST.system)/module.rules