lxc: correctly install configuration files
[feed/packages.git] / utils / lxc / Makefile
index 97d79835ead49967de3d0ebcee44a766e86edd00..3adfd5de952e6aea6caaf4a460fadfb31b202e4e 100644 (file)
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.0.5
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.6
+PKG_RELEASE:=1
+
+PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/
-PKG_MD5SUM:=9d9af9e9e69a831cd50b58d91c786013
+PKG_MD5SUM:=4aad3aee84b42faa194e44091d723a3b
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
@@ -33,6 +35,8 @@ LXC_SCRIPTS += \
 
 DEPENDS_APPLETS = +libpthread +libcap +liblxc
 
+DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates
+DEPENDS_ls = +lxc-config
 DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
 
 
@@ -73,7 +77,13 @@ endef
 define Package/lxc-templates
   $(call Package/lxc/Default)
   TITLE:=LXC virtual machine templates
-  DEPENDS:= lxc @BROKEN
+  DEPENDS:= lxc
+endef
+
+define Package/lxc-configs
+  $(call Package/lxc/Default)
+  TITLE:=LXC virtual machine common config files
+  DEPENDS:= lxc
 endef
 
 define Package/liblxc
@@ -155,16 +165,20 @@ define Package/lxc-common/install
        $(INSTALL_DIR) $(1)/etc/lxc/
        $(CP) \
                $(PKG_INSTALL_DIR)/etc/lxc/default.conf \
-               $(1)/etc/lxc/
+               $(1)/etc/lxc/default.conf
+
+       $(INSTALL_DIR) $(1)/etc/lxc/
+       $(CP) \
+               ./files/lxc.conf \
+               $(1)/etc/lxc/lxc.conf
+
+       $(INSTALL_DIR) $(1)/lxc/
 endef
 
 define Package/lxc-hooks/install
        $(INSTALL_DIR) $(1)/usr/share/lxc/hooks
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/share/lxc/hooks/mountcgroups \
-               $(1)/usr/share/lxc/hooks/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/share/lxc/hooks/mountecryptfsroot \
+               $(PKG_INSTALL_DIR)/usr/share/lxc/hooks/* \
                $(1)/usr/share/lxc/hooks/
 endef
 
@@ -175,6 +189,13 @@ define Package/lxc-templates/install
                $(1)/usr/share/lxc/templates/
 endef
 
+define Package/lxc-configs/install
+       $(INSTALL_DIR) $(1)/usr/share/lxc/config/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/share/lxc/config/* \
+               $(1)/usr/share/lxc/config/
+endef
+
 define Package/liblxc/install
        $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) \
@@ -221,9 +242,11 @@ endef
 $(eval $(call BuildPackage,lxc))
 $(eval $(call BuildPackage,lxc-common))
 $(eval $(call BuildPackage,lxc-hooks))
+$(eval $(call BuildPackage,lxc-configs))
 $(eval $(call BuildPackage,lxc-templates))
 $(eval $(call BuildPackage,liblxc))
 $(eval $(call BuildPackage,lxc-lua))
+$(eval $(call BuildPackage,lxc-init))
 $(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")))