alpine.mk: added xtables-addons

This commit is contained in:
Natanael Copa 2009-02-20 09:45:24 +00:00
parent ec6a945d47
commit cb33004657
1 changed files with 11 additions and 3 deletions

View File

@ -30,6 +30,10 @@ KERNEL_PKGNAME ?= linux-$(KERNEL_FLAVOR)
KERNEL_NAME := $(KERNEL_FLAVOR) KERNEL_NAME := $(KERNEL_FLAVOR)
KERNEL_APK := $(call find_apk,$(KERNEL_PKGNAME)) KERNEL_APK := $(call find_apk,$(KERNEL_PKGNAME))
MODULE_APK := $(subst /$(KERNEL_PKGNAME)-,/$(KERNEL_PKGNAME)-mod-,$(KERNEL_APK)) MODULE_APK := $(subst /$(KERNEL_PKGNAME)-,/$(KERNEL_PKGNAME)-mod-,$(KERNEL_APK))
XTABLES_ADDONS_APK:= $(subst xtables-addons,xtables-addons-$(KERNEL_FLAVOR),$(call find_apk,xtables-addons))
MOD_APKS := $(MODULE_APK) $(XTABLES_ADDONS_APK)
KERNEL := $(word 3,$(subst -, ,$(notdir $(KERNEL_APK))))-$(word 2,$(subst -, ,$(notdir $(KERNEL_APK)))) KERNEL := $(word 3,$(subst -, ,$(notdir $(KERNEL_APK))))-$(word 2,$(subst -, ,$(notdir $(KERNEL_APK))))
ALPINEBASELAYOUT_APK := $(call find_apk,alpine-baselayout) ALPINEBASELAYOUT_APK := $(call find_apk,alpine-baselayout)
@ -89,6 +93,8 @@ $(REPOS_DIRSTAMP): $(SOURCE_APKBUILDS)
@buildrepo -p -a $(APORTS_DIR) -d $(REPOS_DIR) $(REPOS) @buildrepo -p -a $(APORTS_DIR) -d $(REPOS_DIR) $(REPOS)
@touch $@ @touch $@
%.apk: $(REPOS_DIRSTAMP)
# #
# Modloop # Modloop
# #
@ -98,11 +104,13 @@ MODLOOP_DIRSTAMP := $(DESTDIR)/stamp.modloop
modloop: $(MODLOOP) modloop: $(MODLOOP)
$(MODLOOP_DIRSTAMP): $(REPOS_DIRSTAMP) $(MODULE_APK) $(MODLOOP_DIRSTAMP): $(REPOS_DIRSTAMP) $(MOD_APKS)
@echo "==> modloop: prepare $(KERNEL) modules $(notdir $(MODULE_APK))"
@rm -rf $(MODLOOP_DIR) @rm -rf $(MODLOOP_DIR)
@mkdir -p $(MODLOOP_DIR)/lib/modules/ @mkdir -p $(MODLOOP_DIR)/lib/modules/
@tar -C $(MODLOOP_DIR) -xzf $(MODULE_APK) @for i in $(MOD_APKS); do \
echo "==> modloop: prepare modules $$i";\
tar -C $(MODLOOP_DIR) -xzf "$$i"; \
done
@rm -rf $(addprefix $(MODLOOP_DIR)/lib/modules/*/, source build) @rm -rf $(addprefix $(MODLOOP_DIR)/lib/modules/*/, source build)
@depmod $(KERNEL) -b $(MODLOOP_DIR) @depmod $(KERNEL) -b $(MODLOOP_DIR)
@touch $(MODLOOP_DIRSTAMP) @touch $(MODLOOP_DIRSTAMP)