summaryrefslogtreecommitdiff
path: root/bigclown-mqtt2influxdb/Makefile
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-09-12 17:18:42 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-09-12 17:25:25 +0200
commit40764118789f79f79e943a95b805db4e929ec5d7 (patch)
tree3245894722bcd065d12857360dd0df9b0d1ccae2 /bigclown-mqtt2influxdb/Makefile
parentdf3d314797ebc02e0e0ffcd3d53dcc7186964296 (diff)
downloadopenwrt-personal-pkgs-40764118789f79f79e943a95b805db4e929ec5d7.tar.gz
openwrt-personal-pkgs-40764118789f79f79e943a95b805db4e929ec5d7.tar.bz2
openwrt-personal-pkgs-40764118789f79f79e943a95b805db4e929ec5d7.zip
Tweak bigclown packages
Diffstat (limited to 'bigclown-mqtt2influxdb/Makefile')
-rw-r--r--bigclown-mqtt2influxdb/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/bigclown-mqtt2influxdb/Makefile b/bigclown-mqtt2influxdb/Makefile
new file mode 100644
index 0000000..760751f
--- /dev/null
+++ b/bigclown-mqtt2influxdb/Makefile
@@ -0,0 +1,28 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-mqtt2influxdb
+PKG_RELEASE:=1
+PKG_SOURCE_URL:=https://github.com/bigclownlabs/bch-mqtt2influxdb.git
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+include $(TOPDIR)/package/autopkg-tag.mk
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python3-package.mk)
+
+define Package/$(PKG_NAME)
+ TITLE:=BigCLown MQTT to Influxdb bridge
+ DEPENDS:=+python3 +python3-paho-mqtt
+endef
+
+define Py3Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) ./files/mqtt2influxdb $(1)/usr/bin/mqtt2influxdb
+endef
+
+define Build/Compile
+ sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+ $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root=$(PKG_INSTALL_DIR))
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))