From fec04aaf98925c904a44c9ac99388b9e0355017f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 17 Jun 2017 11:21:28 +0200 Subject: Add TMP packages (to be moved to test) --- i2c-collect/Makefile | 74 ++++++++++++++++++++++++++++++++++++++++++++++ python-periphery/Makefile | 40 +++++++++++++++++++++++++ python3-periphery/Makefile | 40 +++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 i2c-collect/Makefile create mode 100644 python-periphery/Makefile create mode 100644 python3-periphery/Makefile diff --git a/i2c-collect/Makefile b/i2c-collect/Makefile new file mode 100644 index 0000000..426bcea --- /dev/null +++ b/i2c-collect/Makefile @@ -0,0 +1,74 @@ +# +# Copyright (C) 2017 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=i2c-collect +PKG_VERSION:=v0.1 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENCE.txt + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=http://git.cynerd.cz/turris-i2c-collect +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/i2c-collect + TITLE:=i2c-collect + URL:=http://git.cynerd.cz/turris-i2c-collect + DEPENDS:=+python +python-perifery +ubus +python-sqlite3 +endef + +define Package/foris-plugin-i2c-collect + TITLE:=i2c-collect + URL:=http://git.cynerd.cz/turris-i2c-collect + DEPENDS:=+python +foris +i2c-collect +endef + +define Build/Compile + true +endef + +define Package/i2c-collect/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon.py $(1)/usr/bin/i2c-collectd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon.init $(1)/etc/init.d/i2c-collect +endef + +define Package/foris-plugin-i2c-collect/install + $(INSTALL_DIR) $(1)/usr/share/foris/plugins + cp -a $(PKG_BUILD_DIR)/foris $(1)/usr/share/foris/plugins/i2c-collect +endef + +define Package/i2c-collect/postinst + [ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/i2c-collect enable + /etc/init.d/i2c-collect restart + } +endef + +define Package/i2c-collect/prerm + [ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/i2c-collect stop + /etc/init.d/i2c-collect disable + } +endef + +define Package/foris-plugin-i2c-collect/postinst + [ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/lighttpd restart + } +endef + +$(eval $(call BuildPackage,i2c-collect)) +$(eval $(call BuildPackage,foris-plugin-i2c-collect)) diff --git a/python-periphery/Makefile b/python-periphery/Makefile new file mode 100644 index 0000000..7547568 --- /dev/null +++ b/python-periphery/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2017 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-periphery +PKG_VERSION:=v1.1.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENCE.txt + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/vsergeev/python-periphery.git +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-periphery + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python-periphery + URL:=http://python.sourceforge.net/ + DEPENDS:=+python +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +$(eval $(call PyPackage,python-periphery)) +$(eval $(call BuildPackage,python-periphery)) diff --git a/python3-periphery/Makefile b/python3-periphery/Makefile new file mode 100644 index 0000000..23907ca --- /dev/null +++ b/python3-periphery/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2017 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python3-periphery +PKG_VERSION:=v1.1.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENCE.txt + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/vsergeev/python-periphery.git +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python3-package.mk) + +define Package/python3-periphery + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python3-periphery + URL:=http://python.sourceforge.net/ + DEPENDS:=+python3 +endef + +define Build/Compile + $(call Build/Compile/Py3Mod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +$(eval $(call Py3Package,python3-periphery)) +$(eval $(call BuildPackage,python3-periphery)) -- cgit v1.2.3