build olsrd out of cloned feed source, use local date and git hash as version
authorJo-Philipp Wich <xm@subsignal.org>
Sun, 5 Dec 2010 21:00:53 +0000 (22:00 +0100)
committerJo-Philipp Wich <xm@subsignal.org>
Sun, 5 Dec 2010 21:00:53 +0000 (22:00 +0100)
openwrt/olsrd-git/Makefile

index b4ae69f..7146b36 100644 (file)
@@ -8,17 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=olsrd-git
-PKG_VERSION:=20101205
-PKG_REV:=HEAD
+PKG_VERSION:=$(shell date +%Y%m%d)+$(shell git --git-dir=$(CURDIR)/../../.git log -1 --pretty=%h)
 PKG_RELEASE:=1
 
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://olsr.org/git/olsrd.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -26,6 +18,11 @@ include $(INCLUDE_DIR)/package.mk
 
 TARGET_CFLAGS += $(FPIC)
 
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+       $(CP) $(CURDIR)/../../* $(PKG_BUILD_DIR)/
+endef
+
 define Package/olsrd-git/template
   SECTION:=net
   CATEGORY:=Network