lxc: bump to 2.1.0
[feed/packages.git] / utils / lxc / Makefile
index 4189eb0dd9507f45aa99b05d2c15dfcc51e143a5..53f52c3ea1a9566a2718262f8a110f2cb0eac831 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.1.5
+PKG_VERSION:=2.1.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
-PKG_MD5SUM:=dd9684dde0a58ed13f4f49c855b79a1a
+PKG_SOURCE_URL:=https://linuxcontainers.org/downloads/lxc/
+PKG_HASH:=394407305a409eb1f95fe06e7718acfe89b1d5df267b0c6aafb1d714e2038de2
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
@@ -27,22 +27,19 @@ PKG_FIXUP:=autoreconf
 include $(INCLUDE_DIR)/package.mk
 
 LXC_APPLETS_BIN += \
-       attach autostart cgroup clone config console create destroy device \
+       attach autostart cgroup copy config console create destroy device \
        execute freeze info monitor snapshot start stop unfreeze unshare \
-       usernsexec wait
+       usernsexec wait top ls
 
 LXC_APPLETS_LIB += \
        monitord user-nic
 
 LXC_SCRIPTS += \
-       checkconfig ls top
+       checkconfig
 
 DEPENDS_APPLETS = +libpthread +libcap +liblxc
 
-DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates
-DEPENDS_ls = +lxc-config
-DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
-
+DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates +flock
 
 define Package/lxc/Default
   SECTION:=utils
@@ -56,6 +53,23 @@ define Package/lxc
   MENU:=1
 endef
 
+define Package/lxc-auto
+  $(call Package/lxc/Default)
+  TITLE:= (initscript)
+  DEPENDS:=+lxc-start +lxc-stop
+endef
+
+define Package/lxc-auto/description
+ LXC is the userspace control package for Linux Containers, a lightweight
+ virtual system mechanism sometimes described as "chroot on steroids".
+ This package adds and initscript for starting and stopping the containers
+ on boot and shutdown.
+endef
+
+define Package/lxc-auto/conffiles
+/etc/config/lxc-auto
+endef
+
 define Package/lxc/config
   source "$(SOURCE)/Config.in"
 endef
@@ -100,7 +114,7 @@ endef
 define Package/lxc-lua
   $(call Package/lxc/Default)
   TITLE:=LXC Lua bindings
-  DEPENDS:= lxc +liblua +liblxc +luafilesystem
+  DEPENDS:= lxc +liblua +liblxc
 endef
 
 define Package/lxc-init
@@ -149,6 +163,12 @@ define Package/lxc/install
        true
 endef
 
+define Package/lxc-auto/install
+       $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
+       $(INSTALL_CONF) ./files/lxc-auto.config $(1)/etc/config/lxc-auto
+       $(INSTALL_BIN) ./files/lxc-auto.init $(1)/etc/init.d/lxc-auto
+endef
+
 define Package/lxc-common/conffiles
 /etc/lxc/default.conf
 /etc/lxc/lxc.conf
@@ -175,7 +195,7 @@ define Package/lxc-common/install
                ./files/lxc.conf \
                $(1)/etc/lxc/lxc.conf
 
-       $(INSTALL_DIR) $(1)/lxc/
+       $(INSTALL_DIR) $(1)/srv/lxc/
 endef
 
 define Package/lxc-hooks/install
@@ -250,6 +270,7 @@ $(eval $(call BuildPackage,lxc-templates))
 $(eval $(call BuildPackage,liblxc))
 $(eval $(call BuildPackage,lxc-lua))
 $(eval $(call BuildPackage,lxc-init))
+$(eval $(call BuildPackage,lxc-auto))
 $(foreach u,$(LXC_APPLETS_BIN),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/bin")))
 $(foreach u,$(LXC_APPLETS_LIB),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/lib/lxc")))
 $(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u),,"/usr/bin")))