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_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://linuxcontainers.org
/downloads
/
16 PKG_MD5SUM
:=4aad3aee84b42faa194e44091d723a3b
18 PKG_BUILD_DEPENDS
:=lua
22 include $(INCLUDE_DIR
)/package.mk
25 attach autostart cgroup clone config console create destroy execute \
26 freeze
info monitor snapshot start stop unfreeze unshare usernsexec wait
34 DEPENDS_APPLETS
= +libpthread
+libcap
+liblxc
36 DEPENDS_ls
= +lxc-config
37 DEPENDS_top
= +lxc-lua
+luafilesystem @BROKEN
40 define Package
/lxc
/Default
43 TITLE
:=LXC userspace tools
44 URL
:=http
://lxc.sourceforge.net
/
45 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
49 $(call Package
/lxc
/Default
)
53 define Package
/lxc
/config
54 source
"$(SOURCE)/Config.in"
57 define Package
/lxc
/description
58 LXC is the userspace control package for Linux Containers
, a lightweight
59 virtual system mechanism sometimes described
as "chroot on steroids".
62 define Package
/lxc-common
63 $(call Package
/lxc
/Default
)
64 TITLE
:=LXC common files
68 define Package
/lxc-hooks
69 $(call Package
/lxc
/Default
)
70 TITLE
:=LXC virtual machine hooks
74 define Package
/lxc-templates
75 $(call Package
/lxc
/Default
)
76 TITLE
:=LXC virtual machine templates
80 define Package
/lxc-configs
81 $(call Package
/lxc
/Default
)
82 TITLE
:=LXC virtual machine common config files
87 $(call Package
/lxc
/Default
)
90 TITLE
:=LXC userspace library
91 DEPENDS
:= lxc
+libcap
+libpthread
94 define Package
/lxc-lua
95 $(call Package
/lxc
/Default
)
96 TITLE
:=LXC Lua bindings
97 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
100 define Package
/lxc-init
101 $(call Package
/lxc
/Default
)
102 TITLE
:=LXC Lua bindings
103 DEPENDS
:= lxc
+liblxc
112 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
115 LUA_INSTALL_CMOD
="/usr/lib/lua" \
116 LUA_INSTALL_LMOD
="/usr/lib/lua"
118 define Build
/Configure
119 ( cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
120 $(call Build
/Configure
/Default
)
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
/lxc.conf
168 define Package
/lxc-hooks
/install
169 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
171 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountcgroups \
172 $(1)/usr
/share
/lxc
/hooks
/
174 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountecryptfsroot \
175 $(1)/usr
/share
/lxc
/hooks
/
178 define Package
/lxc-templates
/install
179 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
181 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
182 $(1)/usr
/share
/lxc
/templates
/
185 define Package
/lxc-configs
/install
186 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
188 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
189 $(1)/usr
/share
/lxc
/config
/
192 define Package
/liblxc
/install
193 $(INSTALL_DIR
) $(1)/usr
/lib
/
195 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
199 define Package
/lxc-lua
/install
200 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
202 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
204 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
206 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
207 $(1)/usr
/lib
/lua
/lxc
/
210 define Package
/lxc-init
/install
211 $(INSTALL_DIR
) $(1)/sbin
213 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
218 define Package
/lxc-
$(1)
219 $(call Package
/lxc
/Default
)
220 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
221 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
224 define Package
/lxc-
$(1)/install
225 $(INSTALL_DIR
) $$(1)$(3)
227 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
231 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
235 $(eval
$(call BuildPackage
,lxc
))
236 $(eval
$(call BuildPackage
,lxc-common
))
237 $(eval
$(call BuildPackage
,lxc-hooks
))
238 $(eval
$(call BuildPackage
,lxc-configs
))
239 $(eval
$(call BuildPackage
,lxc-templates
))
240 $(eval
$(call BuildPackage
,liblxc
))
241 $(eval
$(call BuildPackage
,lxc-lua
))
242 $(eval
$(call BuildPackage
,lxc-init
))
243 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
244 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
245 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))