2 # Copyright (C) 2013-2015 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
15 PKG_MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://linuxcontainers.org
/downloads
/lxc
/
19 PKG_MD5SUM
:=dd9684dde0a58ed13f4f49c855b79a1a
21 PKG_BUILD_DEPENDS
:=lua
27 include $(INCLUDE_DIR
)/package.mk
30 attach autostart cgroup clone config console create destroy device \
31 execute freeze
info monitor snapshot start stop unfreeze unshare \
40 DEPENDS_APPLETS
= +libpthread
+libcap
+liblxc
42 DEPENDS_create
= +lxc-configs
+lxc-hooks
+lxc-templates
43 DEPENDS_ls
= +lxc-config
44 DEPENDS_top
= +lxc-lua
+luafilesystem @BROKEN
47 define Package
/lxc
/Default
50 TITLE
:=LXC userspace tools
51 URL
:=http
://lxc.sourceforge.net
/
55 $(call Package
/lxc
/Default
)
59 define Package
/lxc
/config
60 source
"$(SOURCE)/Config.in"
63 define Package
/lxc
/description
64 LXC is the userspace control package for Linux Containers
, a lightweight
65 virtual system mechanism sometimes described
as "chroot on steroids".
68 define Package
/lxc-common
69 $(call Package
/lxc
/Default
)
70 TITLE
:=LXC common files
74 define Package
/lxc-hooks
75 $(call Package
/lxc
/Default
)
76 TITLE
:=LXC virtual machine hooks
80 define Package
/lxc-templates
81 $(call Package
/lxc
/Default
)
82 TITLE
:=LXC virtual machine templates
86 define Package
/lxc-configs
87 $(call Package
/lxc
/Default
)
88 TITLE
:=LXC virtual machine common config files
93 $(call Package
/lxc
/Default
)
96 TITLE
:=LXC userspace library
97 DEPENDS
:= lxc
+libcap
+libpthread
+LXC_SECCOMP
:libseccomp
100 define Package
/lxc-lua
101 $(call Package
/lxc
/Default
)
102 TITLE
:=LXC Lua bindings
103 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
106 define Package
/lxc-init
107 $(call Package
/lxc
/Default
)
108 TITLE
:=LXC Lua bindings
109 DEPENDS
:= lxc
+liblxc
117 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
119 ifeq ($(CONFIG_LXC_SECCOMP
),y
)
120 CONFIGURE_ARGS
+= --enable-seccomp
122 CONFIGURE_ARGS
+= --disable-seccomp
126 LUA_INSTALL_CMOD
="/usr/lib/lua" \
127 LUA_INSTALL_LMOD
="/usr/lib/lua"
130 define Build
/InstallDev
131 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
133 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
134 $(1)/usr
/include/lxc
/
136 $(INSTALL_DIR
) $(1)/usr
/lib
138 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
141 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
143 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
144 $(1)/usr
/lib
/pkgconfig
/
148 define Package
/lxc
/install
152 define Package
/lxc-common
/conffiles
153 /etc
/lxc
/default.conf
157 define Package
/lxc-common
/install
158 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
160 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
161 $(1)/usr
/lib
/lxc
/rootfs
/
163 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
165 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
168 $(INSTALL_DIR
) $(1)/etc
/lxc
/
170 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
171 $(1)/etc
/lxc
/default.conf
173 $(INSTALL_DIR
) $(1)/etc
/lxc
/
176 $(1)/etc
/lxc
/lxc.conf
178 $(INSTALL_DIR
) $(1)/lxc
/
181 define Package
/lxc-hooks
/install
182 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
184 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
185 $(1)/usr
/share
/lxc
/hooks
/
188 define Package
/lxc-templates
/install
189 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
191 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
192 $(1)/usr
/share
/lxc
/templates
/
195 define Package
/lxc-configs
/install
196 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
198 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
199 $(1)/usr
/share
/lxc
/config
/
202 define Package
/liblxc
/install
203 $(INSTALL_DIR
) $(1)/usr
/lib
/
205 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
209 define Package
/lxc-lua
/install
210 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
212 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
214 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
216 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
217 $(1)/usr
/lib
/lua
/lxc
/
220 define Package
/lxc-init
/install
221 $(INSTALL_DIR
) $(1)/sbin
223 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
228 define Package
/lxc-
$(1)
229 $(call Package
/lxc
/Default
)
230 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
231 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
234 define Package
/lxc-
$(1)/install
235 $(INSTALL_DIR
) $$(1)$(3)
237 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
241 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
245 $(eval
$(call BuildPackage
,lxc
))
246 $(eval
$(call BuildPackage
,lxc-common
))
247 $(eval
$(call BuildPackage
,lxc-hooks
))
248 $(eval
$(call BuildPackage
,lxc-configs
))
249 $(eval
$(call BuildPackage
,lxc-templates
))
250 $(eval
$(call BuildPackage
,liblxc
))
251 $(eval
$(call BuildPackage
,lxc-lua
))
252 $(eval
$(call BuildPackage
,lxc-init
))
253 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
254 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
255 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))