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
81 $(call Package
/lxc
/Default
)
84 TITLE
:=LXC userspace library
85 DEPENDS
:= lxc
+libcap
+libpthread
88 define Package
/lxc-lua
89 $(call Package
/lxc
/Default
)
90 TITLE
:=LXC Lua bindings
91 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
94 define Package
/lxc-init
95 $(call Package
/lxc
/Default
)
96 TITLE
:=LXC Lua bindings
106 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
109 LUA_INSTALL_CMOD
="/usr/lib/lua" \
110 LUA_INSTALL_LMOD
="/usr/lib/lua"
112 define Build
/Configure
113 ( cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
114 $(call Build
/Configure
/Default
)
118 define Build
/InstallDev
119 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
121 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
122 $(1)/usr
/include/lxc
/
124 $(INSTALL_DIR
) $(1)/usr
/lib
126 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
129 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
131 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
132 $(1)/usr
/lib
/pkgconfig
/
136 define Package
/lxc
/install
140 define Package
/lxc-common
/conffiles
141 /etc
/lxc
/default.conf
145 define Package
/lxc-common
/install
146 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
148 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
149 $(1)/usr
/lib
/lxc
/rootfs
/
151 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
153 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
156 $(INSTALL_DIR
) $(1)/etc
/lxc
/
158 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
159 $(1)/etc
/lxc
/lxc.conf
162 define Package
/lxc-hooks
/install
163 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
165 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountcgroups \
166 $(1)/usr
/share
/lxc
/hooks
/
168 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountecryptfsroot \
169 $(1)/usr
/share
/lxc
/hooks
/
172 define Package
/lxc-templates
/install
173 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
175 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
176 $(1)/usr
/share
/lxc
/templates
/
179 define Package
/liblxc
/install
180 $(INSTALL_DIR
) $(1)/usr
/lib
/
182 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
186 define Package
/lxc-lua
/install
187 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
189 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
191 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
193 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
194 $(1)/usr
/lib
/lua
/lxc
/
197 define Package
/lxc-init
/install
198 $(INSTALL_DIR
) $(1)/sbin
200 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
205 define Package
/lxc-
$(1)
206 $(call Package
/lxc
/Default
)
207 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
208 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
211 define Package
/lxc-
$(1)/install
212 $(INSTALL_DIR
) $$(1)$(3)
214 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
218 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
222 $(eval
$(call BuildPackage
,lxc
))
223 $(eval
$(call BuildPackage
,lxc-common
))
224 $(eval
$(call BuildPackage
,lxc-hooks
))
225 $(eval
$(call BuildPackage
,lxc-templates
))
226 $(eval
$(call BuildPackage
,liblxc
))
227 $(eval
$(call BuildPackage
,lxc-lua
))
228 $(eval
$(call BuildPackage
,lxc-init
))
229 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
230 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
231 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))