Compare commits

...

3 Commits

Author SHA1 Message Date
Amin Ben Ramdhane
adecd62530 swmodd: update Makefile 2020-08-21 14:04:13 +01:00
Amin Ben Ramdhane
f78bc18f2c swmodd: enhancement code 2020-07-22 11:11:26 +02:00
Amin Ben Ramdhane
2408b43f24 swmod: use opkg and lxc APIs instead of system calls 2020-07-22 11:11:26 +02:00

View File

@@ -6,10 +6,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=swmodd
PKG_VERSION:=1.0.2
PKG_VERSION:=1.1.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3bfc97cd6f8e22f561601c47b79203b17fdb0fbe
PKG_SOURCE_VERSION:=fc160d427161d9545656f0850e3f01cfb18cd6e7
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/swmodd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -21,7 +21,7 @@ define Package/swmodd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=SWMOD - software modules ubus backend
DEPENDS:=+libuci +libubox +ubus +libuuid
DEPENDS:=+libuci +libubox +ubus +libuuid +libopkg +PACKAGE_liblxc:liblxc
endef
define Package/swmodd/description
@@ -32,11 +32,24 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
ifeq ($(CONFIG_PACKAGE_liblxc),y)
MAKE_FLAGS += \
SWMOD_LXC="yes"
endif
#ifeq ($(CONFIG_PACKAGE_docker-ce),y)
#MAKE_FLAGS += \
# SWMOD_DOCKER="yes"
#endif
define Package/swmodd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/swmodd.init $(1)/etc/init.d/swmodd
$(INSTALL_DIR) $(1)/etc/swmod
$(INSTALL_CONF) ./files/map_du $(1)/etc/swmod/map_du
#ifeq ($(CONFIG_PACKAGE_docker-ce),y)
# $(INSTALL_CONF) ./files/map_docker_du $(1)/etc/swmod/map_docker_du
#endif
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swmodd $(1)/usr/sbin/swmodd
endef