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
:=3ebadacf5fe8bfe689fd7a09812b682c
21 PKG_BUILD_DEPENDS
:=lua
27 include $(INCLUDE_DIR
)/package.mk
30 attach autostart cgroup clone config console create destroy execute \
31 freeze
info monitor snapshot start stop unfreeze unshare usernsexec wait
39 DEPENDS_APPLETS
= +libpthread
+libcap
+liblxc
41 DEPENDS_create
= +lxc-configs
+lxc-hooks
+lxc-templates
42 DEPENDS_ls
= +lxc-config
43 DEPENDS_top
= +lxc-lua
+luafilesystem @BROKEN
46 define Package
/lxc
/Default
49 TITLE
:=LXC userspace tools
50 URL
:=http
://lxc.sourceforge.net
/
54 $(call Package
/lxc
/Default
)
58 define Package
/lxc
/config
59 source
"$(SOURCE)/Config.in"
62 define Package
/lxc
/description
63 LXC is the userspace control package for Linux Containers
, a lightweight
64 virtual system mechanism sometimes described
as "chroot on steroids".
67 define Package
/lxc-common
68 $(call Package
/lxc
/Default
)
69 TITLE
:=LXC common files
73 define Package
/lxc-hooks
74 $(call Package
/lxc
/Default
)
75 TITLE
:=LXC virtual machine hooks
79 define Package
/lxc-templates
80 $(call Package
/lxc
/Default
)
81 TITLE
:=LXC virtual machine templates
85 define Package
/lxc-configs
86 $(call Package
/lxc
/Default
)
87 TITLE
:=LXC virtual machine common config files
92 $(call Package
/lxc
/Default
)
95 TITLE
:=LXC userspace library
96 DEPENDS
:= lxc
+libcap
+libpthread
99 define Package
/lxc-lua
100 $(call Package
/lxc
/Default
)
101 TITLE
:=LXC Lua bindings
102 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
105 define Package
/lxc-init
106 $(call Package
/lxc
/Default
)
107 TITLE
:=LXC Lua bindings
108 DEPENDS
:= lxc
+liblxc
117 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
120 LUA_INSTALL_CMOD
="/usr/lib/lua" \
121 LUA_INSTALL_LMOD
="/usr/lib/lua"
124 define Build
/InstallDev
125 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
127 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
128 $(1)/usr
/include/lxc
/
130 $(INSTALL_DIR
) $(1)/usr
/lib
132 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
135 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
137 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
138 $(1)/usr
/lib
/pkgconfig
/
142 define Package
/lxc
/install
146 define Package
/lxc-common
/conffiles
147 /etc
/lxc
/default.conf
151 define Package
/lxc-common
/install
152 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
154 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
155 $(1)/usr
/lib
/lxc
/rootfs
/
157 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
159 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
162 $(INSTALL_DIR
) $(1)/etc
/lxc
/
164 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
165 $(1)/etc
/lxc
/default.conf
167 $(INSTALL_DIR
) $(1)/etc
/lxc
/
170 $(1)/etc
/lxc
/lxc.conf
172 $(INSTALL_DIR
) $(1)/lxc
/
175 define Package
/lxc-hooks
/install
176 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
178 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
179 $(1)/usr
/share
/lxc
/hooks
/
182 define Package
/lxc-templates
/install
183 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
185 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
186 $(1)/usr
/share
/lxc
/templates
/
189 define Package
/lxc-configs
/install
190 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
192 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
193 $(1)/usr
/share
/lxc
/config
/
196 define Package
/liblxc
/install
197 $(INSTALL_DIR
) $(1)/usr
/lib
/
199 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
203 define Package
/lxc-lua
/install
204 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
206 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
208 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
210 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
211 $(1)/usr
/lib
/lua
/lxc
/
214 define Package
/lxc-init
/install
215 $(INSTALL_DIR
) $(1)/sbin
217 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
222 define Package
/lxc-
$(1)
223 $(call Package
/lxc
/Default
)
224 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
225 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
228 define Package
/lxc-
$(1)/install
229 $(INSTALL_DIR
) $$(1)$(3)
231 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
235 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
239 $(eval
$(call BuildPackage
,lxc
))
240 $(eval
$(call BuildPackage
,lxc-common
))
241 $(eval
$(call BuildPackage
,lxc-hooks
))
242 $(eval
$(call BuildPackage
,lxc-configs
))
243 $(eval
$(call BuildPackage
,lxc-templates
))
244 $(eval
$(call BuildPackage
,liblxc
))
245 $(eval
$(call BuildPackage
,lxc-lua
))
246 $(eval
$(call BuildPackage
,lxc-init
))
247 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
248 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
249 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))