Merge pull request #878 from jow-/lxc-autoconf-fix
[feed/packages.git] / utils / lxc / Makefile
index 0b684eb66682f59b8b5c59ff86d4d7228ca0e58c..eaf77efdb43c8e862261352bd128c06dd65a81d3 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2014 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,16 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.0.5
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
+PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/
-PKG_MD5SUM:=9d9af9e9e69a831cd50b58d91c786013
+PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
+PKG_MD5SUM:=ab1cbabf859abc15165050c854979c5c
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
+
 PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,6 +38,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
 
 
@@ -41,7 +48,6 @@ define Package/lxc/Default
   CATEGORY:=Utilities
   TITLE:=LXC userspace tools
   URL:=http://lxc.sourceforge.net/
-  MAINTAINER:=Luka Perkov <luka@openwrt.org>
 endef
 
 define Package/lxc
@@ -73,7 +79,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
@@ -108,11 +120,6 @@ MAKE_FLAGS += \
        LUA_INSTALL_CMOD="/usr/lib/lua" \
        LUA_INSTALL_LMOD="/usr/lib/lua"
 
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); ./autogen.sh );
-       $(call Build/Configure/Default)
-endef
-
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/lxc/
@@ -155,16 +162,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 +186,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,6 +239,7 @@ 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))