2 # Copyright (C) 2013-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_LICENSE
:=LGPL-2.1
+ BSD-2-Clause GPL-2.0
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://linuxcontainers.org
/downloads
/
18 PKG_MD5SUM
:=4aad3aee84b42faa194e44091d723a3b
20 PKG_BUILD_DEPENDS
:=lua
24 include $(INCLUDE_DIR
)/package.mk
27 attach autostart cgroup clone config console create destroy execute \
28 freeze
info monitor snapshot start stop unfreeze unshare usernsexec wait
36 DEPENDS_APPLETS
= +libpthread
+libcap
+liblxc
38 DEPENDS_create
= +lxc-configs
+lxc-hooks
+lxc-templates
39 DEPENDS_ls
= +lxc-config
40 DEPENDS_top
= +lxc-lua
+luafilesystem @BROKEN
43 define Package
/lxc
/Default
46 TITLE
:=LXC userspace tools
47 URL
:=http
://lxc.sourceforge.net
/
48 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
52 $(call Package
/lxc
/Default
)
56 define Package
/lxc
/config
57 source
"$(SOURCE)/Config.in"
60 define Package
/lxc
/description
61 LXC is the userspace control package for Linux Containers
, a lightweight
62 virtual system mechanism sometimes described
as "chroot on steroids".
65 define Package
/lxc-common
66 $(call Package
/lxc
/Default
)
67 TITLE
:=LXC common files
71 define Package
/lxc-hooks
72 $(call Package
/lxc
/Default
)
73 TITLE
:=LXC virtual machine hooks
77 define Package
/lxc-templates
78 $(call Package
/lxc
/Default
)
79 TITLE
:=LXC virtual machine templates
83 define Package
/lxc-configs
84 $(call Package
/lxc
/Default
)
85 TITLE
:=LXC virtual machine common config files
90 $(call Package
/lxc
/Default
)
93 TITLE
:=LXC userspace library
94 DEPENDS
:= lxc
+libcap
+libpthread
97 define Package
/lxc-lua
98 $(call Package
/lxc
/Default
)
99 TITLE
:=LXC Lua bindings
100 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
103 define Package
/lxc-init
104 $(call Package
/lxc
/Default
)
105 TITLE
:=LXC Lua bindings
106 DEPENDS
:= lxc
+liblxc
115 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
118 LUA_INSTALL_CMOD
="/usr/lib/lua" \
119 LUA_INSTALL_LMOD
="/usr/lib/lua"
121 define Build
/Configure
122 ( cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
123 $(call Build
/Configure
/Default
)
127 define Build
/InstallDev
128 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
130 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
131 $(1)/usr
/include/lxc
/
133 $(INSTALL_DIR
) $(1)/usr
/lib
135 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
138 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
140 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
141 $(1)/usr
/lib
/pkgconfig
/
145 define Package
/lxc
/install
149 define Package
/lxc-common
/conffiles
150 /etc
/lxc
/default.conf
154 define Package
/lxc-common
/install
155 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
157 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
158 $(1)/usr
/lib
/lxc
/rootfs
/
160 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
162 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
165 $(INSTALL_DIR
) $(1)/etc
/lxc
/
167 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
168 $(1)/etc
/lxc
/default.conf
170 $(INSTALL_DIR
) $(1)/etc
/lxc
/
173 $(1)/etc
/lxc
/lxc.conf
175 $(INSTALL_DIR
) $(1)/lxc
/
178 define Package
/lxc-hooks
/install
179 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
181 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
182 $(1)/usr
/share
/lxc
/hooks
/
185 define Package
/lxc-templates
/install
186 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
188 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
189 $(1)/usr
/share
/lxc
/templates
/
192 define Package
/lxc-configs
/install
193 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
195 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
196 $(1)/usr
/share
/lxc
/config
/
199 define Package
/liblxc
/install
200 $(INSTALL_DIR
) $(1)/usr
/lib
/
202 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
206 define Package
/lxc-lua
/install
207 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
209 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
211 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
213 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
214 $(1)/usr
/lib
/lua
/lxc
/
217 define Package
/lxc-init
/install
218 $(INSTALL_DIR
) $(1)/sbin
220 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
225 define Package
/lxc-
$(1)
226 $(call Package
/lxc
/Default
)
227 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
228 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
231 define Package
/lxc-
$(1)/install
232 $(INSTALL_DIR
) $$(1)$(3)
234 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
238 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
242 $(eval
$(call BuildPackage
,lxc
))
243 $(eval
$(call BuildPackage
,lxc-common
))
244 $(eval
$(call BuildPackage
,lxc-hooks
))
245 $(eval
$(call BuildPackage
,lxc-configs
))
246 $(eval
$(call BuildPackage
,lxc-templates
))
247 $(eval
$(call BuildPackage
,liblxc
))
248 $(eval
$(call BuildPackage
,lxc-lua
))
249 $(eval
$(call BuildPackage
,lxc-init
))
250 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
251 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
252 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))