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 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
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
118 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
121 LUA_INSTALL_CMOD
="/usr/lib/lua" \
122 LUA_INSTALL_LMOD
="/usr/lib/lua"
125 define Build
/InstallDev
126 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
128 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
129 $(1)/usr
/include/lxc
/
131 $(INSTALL_DIR
) $(1)/usr
/lib
133 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
136 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
138 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
139 $(1)/usr
/lib
/pkgconfig
/
143 define Package
/lxc
/install
147 define Package
/lxc-common
/conffiles
148 /etc
/lxc
/default.conf
152 define Package
/lxc-common
/install
153 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
155 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
156 $(1)/usr
/lib
/lxc
/rootfs
/
158 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
160 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
163 $(INSTALL_DIR
) $(1)/etc
/lxc
/
165 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
166 $(1)/etc
/lxc
/default.conf
168 $(INSTALL_DIR
) $(1)/etc
/lxc
/
171 $(1)/etc
/lxc
/lxc.conf
173 $(INSTALL_DIR
) $(1)/lxc
/
176 define Package
/lxc-hooks
/install
177 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
179 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
180 $(1)/usr
/share
/lxc
/hooks
/
183 define Package
/lxc-templates
/install
184 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
186 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
187 $(1)/usr
/share
/lxc
/templates
/
190 define Package
/lxc-configs
/install
191 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
193 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
194 $(1)/usr
/share
/lxc
/config
/
197 define Package
/liblxc
/install
198 $(INSTALL_DIR
) $(1)/usr
/lib
/
200 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
204 define Package
/lxc-lua
/install
205 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
207 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
209 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
211 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
212 $(1)/usr
/lib
/lua
/lxc
/
215 define Package
/lxc-init
/install
216 $(INSTALL_DIR
) $(1)/sbin
218 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
223 define Package
/lxc-
$(1)
224 $(call Package
/lxc
/Default
)
225 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
226 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
229 define Package
/lxc-
$(1)/install
230 $(INSTALL_DIR
) $$(1)$(3)
232 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
236 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
240 $(eval
$(call BuildPackage
,lxc
))
241 $(eval
$(call BuildPackage
,lxc-common
))
242 $(eval
$(call BuildPackage
,lxc-hooks
))
243 $(eval
$(call BuildPackage
,lxc-configs
))
244 $(eval
$(call BuildPackage
,lxc-templates
))
245 $(eval
$(call BuildPackage
,liblxc
))
246 $(eval
$(call BuildPackage
,lxc-lua
))
247 $(eval
$(call BuildPackage
,lxc-init
))
248 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
249 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
250 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))