diff options
Diffstat (limited to 'pkgauto.mk')
-rw-r--r-- | pkgauto.mk | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/pkgauto.mk b/pkgauto.mk deleted file mode 100644 index b433ea0..0000000 --- a/pkgauto.mk +++ /dev/null @@ -1,43 +0,0 @@ -ifneq ($(PKG_SOURCE_PROTO),git) -$(error Only supported protocol is git) -endif -ifndef PKG_NAME -$(error You have to define PKG_NAME before pkgauto.mk include) -endif -ifndef PKG_SOURCE_URL -$(error You have to define PKG_SOURCE_URL before pkgauto.mk include) -endif -ifndef PKG_SOURCE_BRANCH -$(error You have to define PKG_SOURCE_BRANCH before pkgauto.mk include) -endif - -TMP_REPO_PATH=/%PKGAUTO%/myrepo_$(PKG_NAME) - -GIT_ARGS=--git-dir='$(TMP_REPO_PATH)' --bare - -$(shell \ - if [ ! -d "$(TMP_REPO_PATH)" ]; then \ - git clone --bare "$(PKG_SOURCE_URL)" "$(TMP_REPO_PATH)"; \ - else \ - git $(GIT_ARGS) fetch "$(PKG_SOURCE_URL)"; \ - fi \ -) - -PKG_SOURCE_VERSION:=$(shell git $(GIT_ARGS) rev-parse $(PKG_SOURCE_BRANCH)) -PKG_VERSION:=$(shell git $(GIT_ARGS) describe --abbrev=0 --tags $(PKG_SOURCE_BRANCH) | sed 's/^v//') - -ifeq ($(PKG_VERSION),) -# No version found so we use 9999 instead and count commits since initial commit. -PKG_VERSION:=9999 -PKG_RELEASE:=$(shell git $(GIT_ARGS) rev-list --count $(PKG_SOURCE_VERSION)) -else -PKG_RELEASE:=$(shell git $(GIT_ARGS) rev-list --count v$(PKG_VERSION)..$(PKG_SOURCE_VERSION)) -PKG_VERSION:=$(PKG_VERSION).9999 -endif - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME) - -# TODO drop TMP_REPO_PATH $GIT_ARGS |