contrib: use mkrevision.sh to create package version, assume full checkout/clone of LuCI and abort with error for old style feed urls
This commit is contained in:
parent
cf99c53a74
commit
6bc05d8de4
1 changed files with 13 additions and 25 deletions
|
@ -1,32 +1,16 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_BRANCH:=trunk
|
LUCI_TOPDIR=../../..
|
||||||
|
|
||||||
ifeq ($(DUMP),)
|
|
||||||
USELOCAL:=$(shell grep luci ../../../.project 2>/dev/null >/dev/null && echo 1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PKG_NAME:=luci
|
PKG_NAME:=luci
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=0
|
PKG_BUILD_PARALLEL:=0
|
||||||
|
|
||||||
ifeq ($(USELOCAL),1)
|
PKG_VERSION:=$(shell $(LUCI_TOPDIR)/build/mkrevision.sh 2>/dev/null || echo unknown)
|
||||||
PKG_VERSION:=trunk+svn
|
|
||||||
else
|
|
||||||
PKG_SOURCE_URL:=http://svn.luci.subsignal.org/luci/$(PKG_BRANCH)
|
|
||||||
ifeq ($(DUMP),)
|
|
||||||
PKG_REV:=$(shell LC_ALL=C svn info $(CURDIR) | sed -ne's/^Revision: //p')
|
|
||||||
PKG_VERSION:=trunk+svn$(PKG_REV)
|
|
||||||
endif
|
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
|
||||||
PKG_SOURCE_PROTO:=svn
|
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=$(if $(STAGING_DIR_ROOT),lua/host)
|
PKG_BUILD_DEPENDS:=$(if $(STAGING_DIR_ROOT),lua/host)
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
LUA_TARGET:=source
|
LUA_TARGET:=source
|
||||||
|
@ -63,7 +47,7 @@ define Package/luci-lib-core/install
|
||||||
$(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
|
$(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
|
||||||
"OpenWrt Firmware" \
|
"OpenWrt Firmware" \
|
||||||
"$(OPENWRTVERSION)" \
|
"$(OPENWRTVERSION)" \
|
||||||
"$(PKG_BRANCH)" \
|
"trunk" \
|
||||||
"$(PKG_VERSION)"
|
"$(PKG_VERSION)"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -618,16 +602,20 @@ PKG_CONFIG_DEPENDS=$(patsubst %,CONFIG_PACKAGE_%,$(LUCI_BUILD_PACKAGES))
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
ifeq ($(USELOCAL),1)
|
define Build/Prepare
|
||||||
define Build/Prepare
|
@if [ ! -x $(LUCI_TOPDIR)/build/mkrevision.sh ]; then \
|
||||||
|
echo "*** Repository layout changed!" >&2; \
|
||||||
|
echo "*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
|
||||||
|
echo "*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
$(TAR) c -C ../../../ . \
|
$(TAR) c -C $(LUCI_TOPDIR) . \
|
||||||
--exclude=.pc --exclude=.svn --exclude=.git \
|
--exclude=.pc --exclude=.svn --exclude=.git \
|
||||||
--exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
|
--exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
|
||||||
--exclude=dist | \
|
--exclude=dist | \
|
||||||
tar x -C $(PKG_BUILD_DIR)/
|
tar x -C $(PKG_BUILD_DIR)/
|
||||||
endef
|
endef
|
||||||
endif
|
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue