1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

fixes downloading the archive with each ``make -B``

This commit is contained in:
Thomas Eichinger 2014-01-20 12:34:07 +01:00
parent f25e9f1f79
commit d41b92094a

View File

@ -1,5 +1,5 @@
PKG_NAME=RB
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw/archive
PKG_URL=https://codeload.github.com/openwsn-berkeley/openwsn-fw
PKG_VERSION=1.4
PKG_EXT=zip
@ -7,35 +7,34 @@ FETCH=$(shell which wget &> /dev/null && echo "wget" || echo "curl")
#UNPACK=tar -xvf
UNPACK=unzip
ifeq ($(FETCH),curl )
FETCH_FLAGS += -z $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT) -o
else
FETCH_FLAGS += -nc -O
endif
ifneq ($(RIOTBOARD),)
#include $(RIOTBOARD)/Makefile.base
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif
.PHONY: all clean patch reset
.PHONY: all clean
all: patch
all: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/
make -C $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
patch: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/Makefile
# Dependancy might be changed accordingly though we think the Makefile
# will be the first thing you want to change
#
# Here might not happen anything besides dependancy checks
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/Makefile: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/
# Here you apply your patch.
cd $< && sh ../structure_changes.sh
cd $< && patch -p0 -N -i ../patch.txt
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
$(UNPACK) $< -d $(PKG_NAME)-$(PKG_VERSION)
$(AD)rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
$(AD)$(UNPACK) $< -d $(PKG_NAME)-$(PKG_VERSION)
$(AD)cd $@ && sh ../structure_changes.sh
$(AD)cd $@ && patch -p0 -N -i ../patch.txt
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT):
# rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
# Get PKG_VERSION of package from PKG_URL
@$(FETCH) -O $@ $(PKG_URL)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT) || true
$(AD)$(FETCH) $(FETCH_FLAGS) $@ $(PKG_URL)/$(PKG_EXT)/$(PKG_NAME)-$(PKG_VERSION) || true
clean::
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION) $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
distclean::
rm -f $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)