###################################################### # # A really simple example that doesn't actually build anything # It'll fetch a package from another repository for inclusion # into our final list # Using one from the openwrt home as an example # ###################################################### NETFILTM=netfilter-modules NETFILTM_TARGET=netfilter-modules_2.4.20_mipsel.ipk NETFILTM_SITE=http://www.katastrophos.net/wrt54g/sources NETFILTMIPK_SRC=netfilter-modules-pkg.tar.gz netfilter-modules-ipk: $(BUILD_DIR)/$(NETFILTM_TARGET) # fetch the ipkg rules stuff $(DL_DIR)/$(NETFILTMIPK_SRC) : $(WGET) -P $(DL_DIR) $(NETFILTM_SITE)/$(NETFILTMIPK_SRC) #make sure we have a directory to extract to $(BUILD_DIR)/$(NETFILTM) : mkdir $(BUILD_DIR)/$(NETFILTM) ln -s $(BUILD_DIR)/linux/modules/lib/modules $(BUILD_DIR)/$(NETFILTM)/modules # extract the ipkg overlay $(BUILD_DIR)/$(NETFILTM)/ipkg/control : $(DL_DIR)/$(NETFILTMIPK_SRC) $(BUILD_DIR)/$(NETFILTM) tar -C $(BUILD_DIR)/$(NETFILTM) -zxf $(DL_DIR)/$(NETFILTMIPK_SRC) # now that we have it all in place, just build it $(BUILD_DIR)/$(NETFILTM_TARGET): $(BUILD_DIR)/$(NETFILTM)/ipkg/control cd $(BUILD_DIR)/$(NETFILTM); ipkg-buildpackage -c