Skip to content
Snippets Groups Projects
Commit f0eaed7f authored by Martine Lenders's avatar Martine Lenders
Browse files

Merge pull request #5138 from kaspar030/pkg_unify_git_checkout

pkg: unify git checkout
parents 3d9f66e9 0cacc8b1
No related branches found
No related tags found
No related merge requests found
Showing
with 22 additions and 105 deletions
PKG_NAME= # name of the package PKG_NAME= # name of the package
PKG_URL= # source url of the package e.g. a git repository PKG_URL= # source url of the package's git repository
PKG_VERSION= # version of the package to use e.g. a git commit/ref PKG_VERSION= # version of the package to use e.g. a git commit/ref
ifneq ($(RIOTBOARD),) .PHONY: all
include $(RIOTBOARD)/Makefile.base
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif
.PHONY: all clean patch distclean all: download
all: patch
$(MAKE) -C $(CURDIR)/$(PKG_NAME) $(MAKE) -C $(CURDIR)/$(PKG_NAME)
patch: $(CURDIR)/$(PKG_NAME)/Makefile include $(RIOTBASE)/pkg/pkg.mk
# 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)/Makefile: $(CURDIR)/$(PKG_NAME)
# Here you apply your patch.
$(foreach patch,$(shell ls [0-9][0-9][0-9][0-9]*.patch),cd "$<" && git am "$(patch)" || { git am --abort; exit 1; };)
$(PKG_NAME):
# Get PKG_VERSION of package from PKG_URL
git clone $(PKG_URL) $(PKG_NAME) && cd $(PKG_NAME) && git reset --hard $(PKG_VERSION)
clean::
# Reset package to checkout state.
cd $(CURDIR)/$(PKG_NAME) || true && \
git clean -x -f && \
git reset --hard $(PKG_VERSION)
distclean::
rm -rf $(CURDIR)/$(PKG_NAME)
/ccn-lite
PKG_NAME=ccn-lite PKG_NAME=ccn-lite
PKG_URL=https://github.com/OlegHahm/ccn-lite/ PKG_URL=https://github.com/OlegHahm/ccn-lite/
PKG_VERSION=39b1406c11de9de364220909488eebabe7e81613 PKG_VERSION=39b1406c11de9de364220909488eebabe7e81613
PKG_DIR=$(CURDIR)/$(PKG_NAME)
.PHONY: all clean distclean .PHONY: all
export RIOT_CFLAGS = ${CFLAGS} ${INCLUDES} export RIOT_CFLAGS = ${CFLAGS} ${INCLUDES}
all: $(PKG_DIR)/Makefile all: download
"$(MAKE)" -BC $(PKG_DIR)/src lib-ccn-lite.a "$(MAKE)" -BC $(PKG_BUILDDIR)/src lib-ccn-lite.a
"$(MAKE)" -BC $(PKG_DIR)/src lib-ccn-lite-utils.a "$(MAKE)" -BC $(PKG_BUILDDIR)/src lib-ccn-lite-utils.a
cp $(PKG_DIR)/src/lib-ccn-lite.a ${BINDIR}/ccn-lite.a cp $(PKG_BUILDDIR)/src/lib-ccn-lite.a ${BINDIR}/ccn-lite.a
cp $(PKG_DIR)/src/lib-ccn-lite-utils.a ${BINDIR}/ccn-lite-utils.a cp $(PKG_BUILDDIR)/src/lib-ccn-lite-utils.a ${BINDIR}/ccn-lite-utils.a
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config include $(RIOTBASE)/pkg/pkg.mk
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
clean::
@echo "Cleaning up CCN-Lite package..."
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
git clean -x -f && \
git reset --hard "$(PKG_VERSION)"
distclean::
rm -rf "$(PKG_DIR)"
Makefile.include:
@true
INCLUDES += -I$(RIOTPKG)/ccn-lite -I$(RIOTPKG)/ccn-lite/ccn-lite/src INCLUDES += -I$(RIOTPKG)/ccn-lite -I$(BINDIR)/pkg/ccn-lite/src
INCLUDES += -I$(RIOTBASE)/sys/posix/include INCLUDES += -I$(RIOTBASE)/sys/posix/include
/cmsis-dsp
PKG_NAME=cmsis-dsp PKG_NAME=cmsis-dsp
PKG_URL=https://github.com/gebart/CMSIS-DSP.git PKG_URL=https://github.com/gebart/CMSIS-DSP.git
PKG_VERSION=v1.4.5a-riot1 PKG_VERSION=v1.4.5a-riot1
PKG_DIR=$(CURDIR)/$(PKG_NAME)
ifneq ($(RIOTBASE),) ifneq ($(RIOTBASE),)
include $(RIOTBASE)/Makefile.base include $(RIOTBASE)/Makefile.base
endif endif
.PHONY: all clean patch distclean .PHONY: all
all: $(PKG_DIR)/Makefile all: download
$(MAKE) -C $(CURDIR)/$(PKG_NAME) $(MAKE) -C $(PKG_BUILDDIR)
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config include $(RIOTBASE)/pkg/pkg.mk
@
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
clean::
@echo "Cleaning up $(PKG_NAME) package..."
@-cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
git clean -x -f && \
git am --abort && \
git reset --hard "$(PKG_VERSION)"
distclean::
rm -rf "$(PKG_DIR)"
INCLUDES += -I$(RIOTPKG)/cmsis-dsp/cmsis-dsp/include INCLUDES += -I$(BINDIR)/pkg/cmsis-dsp/include
/libcoap
PKG_NAME=libcoap PKG_NAME=libcoap
PKG_URL=https://github.com/obgm/libcoap PKG_URL=https://github.com/obgm/libcoap
PKG_VERSION=ef41ce5d02d64cec0751882ae8fd95f6c32bc018 PKG_VERSION=ef41ce5d02d64cec0751882ae8fd95f6c32bc018
PKG_DIR=$(CURDIR)/$(PKG_NAME)
ifneq ($(RIOTBASE),) ifneq ($(RIOTBASE),)
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \ INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
-I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include -I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include
endif endif
.PHONY: all clean patch reset .PHONY: all
all: patch all: download
"$(MAKE)" -C $(PKG_DIR) "$(MAKE)" -C $(PKG_BUILDDIR)
patch: $(PKG_DIR)/Makefile include $(RIOTBASE)/pkg/pkg.mk
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
cd "$(PKG_DIR)" && git am --ignore-whitespace "$(CURDIR)"/*.patch
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
clean::
@echo "Cleaning up libcoap package..."
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
git clean -x -f && \
git am --abort && \
git reset --hard "$(PKG_VERSION)" && \
$(MAKE) patch || true
distclean::
rm -rf "$(PKG_DIR)"
Makefile.include:
@true
INCLUDES += -I$(RIOTPKG)/libcoap/libcoap \ INCLUDES += -I$(BINDIR)/pkg/libcoap \
-I$(RIOTBASE)/sys/posix/include \ -I$(RIOTBASE)/sys/posix/include \
-I$(RIOTBASE)/sys/net/include -I$(RIOTBASE)/sys/net/include
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
/micro-ecc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment