2011-01-07 13:41:46 +00:00
|
|
|
# Copyright (c) 2010-2011 Bart Van Der Meerssche
|
2010-09-02 12:35:24 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=flukso
|
2011-01-09 11:00:50 +00:00
|
|
|
PKG_VERSION:=2.0-alpha
|
2011-03-10 09:07:03 +00:00
|
|
|
PKG_RELEASE:=2
|
2010-09-02 12:35:24 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/flukso
|
2011-01-09 11:00:50 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=+libdaemon +ntpclient +liblua +luci-nixio +rrdtool1
|
|
|
|
TITLE:=Flukso - community metering
|
|
|
|
URL:=http://www.flukso.net
|
|
|
|
MAINTAINER:=Bart Van Der Meerssche <bart.vandermeerssche@flukso.net>
|
2010-09-02 12:35:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/flukso/description
|
|
|
|
This package contains the Flukso daemon code and support libraries.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
2011-01-07 13:41:46 +00:00
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
2010-09-02 12:35:24 +00:00
|
|
|
$(CP) ./luasrc/* $(PKG_BUILD_DIR)/
|
2011-01-27 09:46:29 +00:00
|
|
|
$(CP) ./config/* $(PKG_BUILD_DIR)/
|
2011-02-25 23:09:24 +00:00
|
|
|
$(CP) -r ./files $(PKG_BUILD_DIR)/
|
2010-09-02 12:35:24 +00:00
|
|
|
endef
|
|
|
|
|
2011-02-25 23:09:24 +00:00
|
|
|
FLUKSO_COMMIT:=$(shell git rev-parse HEAD | awk '{print substr($$0,1,16)}')
|
|
|
|
|
2010-09-02 12:35:24 +00:00
|
|
|
define Package/flukso/install
|
2011-02-25 23:09:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/banner $(1)/etc/banner
|
|
|
|
|
|
|
|
$(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
|
|
|
|
$(SED) 's,$$$$F,$(PKG_VERSION)-$(PKG_RELEASE),g' $(1)/etc/banner
|
|
|
|
$(SED) 's,$$$$G,$(FLUKSO_COMMIT),g' $(1)/etc/banner
|
|
|
|
|
2011-01-27 09:46:29 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/flukso.uci $(1)/etc/config/flukso
|
2011-02-03 11:28:36 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/flukso.init $(1)/etc/init.d/flukso
|
2010-09-02 12:35:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
2011-01-07 13:41:46 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dbg.lua $(1)/usr/lib/lua/
|
2010-09-02 12:35:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/rrd
|
2011-01-07 13:41:46 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rrd/*.lua $(1)/usr/lib/lua/rrd/
|
2011-01-09 11:00:50 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/flukso
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/flukso/*.lua $(1)/usr/lib/lua/flukso/
|
2011-01-07 13:41:46 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/luad $(1)/usr/sbin/
|
2011-01-09 11:00:50 +00:00
|
|
|
$(LN) /usr/sbin/luad $(1)/usr/sbin/fluksod
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fluksod.lua $(1)/usr/sbin/
|
2011-02-03 11:28:36 +00:00
|
|
|
$(LN) /usr/sbin/luad $(1)/usr/sbin/spid
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/spid.lua $(1)/usr/sbin/
|
2011-01-27 09:46:29 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fsync.lua $(1)/usr/bin/fsync
|
2011-02-12 14:27:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdude.lua $(1)/usr/bin/fdude
|
2011-02-03 11:28:36 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/restful.lua $(1)/usr/bin/restful
|
2010-09-02 12:35:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,flukso))
|