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
:=9d9af9e9e69a831cd50b58d91c786013
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_top
= +lxc-lua
+luafilesystem @BROKEN
39 define Package
/lxc
/Default
42 TITLE
:=LXC userspace tools
43 URL
:=http
://lxc.sourceforge.net
/
44 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
48 $(call Package
/lxc
/Default
)
52 define Package
/lxc
/description
53 LXC is the userspace control package for Linux Containers
, a lightweight
54 virtual system mechanism sometimes described
as "chroot on steroids".
57 define Package
/lxc-common
58 $(call Package
/lxc
/Default
)
59 TITLE
:=LXC common files
63 define Package
/lxc-hooks
64 $(call Package
/lxc
/Default
)
65 TITLE
:=LXC virtual machine hooks
69 define Package
/lxc-templates
70 $(call Package
/lxc
/Default
)
71 TITLE
:=LXC virtual machine templates
76 $(call Package
/lxc
/Default
)
79 TITLE
:=LXC userspace library
80 DEPENDS
:= lxc
+libcap
+libpthread
83 define Package
/lxc-lua
84 $(call Package
/lxc
/Default
)
85 TITLE
:=LXC Lua bindings
86 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
89 define Package
/lxc-init
90 $(call Package
/lxc
/Default
)
91 TITLE
:=LXC Lua bindings
101 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
104 LUA_INSTALL_CMOD
="/usr/lib/lua" \
105 LUA_INSTALL_LMOD
="/usr/lib/lua"
107 define Build
/Configure
108 ( cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
109 $(call Build
/Configure
/Default
)
113 define Build
/InstallDev
114 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
116 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
117 $(1)/usr
/include/lxc
/
119 $(INSTALL_DIR
) $(1)/usr
/lib
121 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
124 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
126 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
127 $(1)/usr
/lib
/pkgconfig
/
131 define Package
/lxc
/install
135 define Package
/lxc-common
/conffiles
136 /etc
/lxc
/default.conf
140 define Package
/lxc-common
/install
141 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
143 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
144 $(1)/usr
/lib
/lxc
/rootfs
/
146 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
148 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
151 $(INSTALL_DIR
) $(1)/etc
/lxc
/
153 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
157 define Package
/lxc-hooks
/install
158 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
160 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountcgroups \
161 $(1)/usr
/share
/lxc
/hooks
/
163 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountecryptfsroot \
164 $(1)/usr
/share
/lxc
/hooks
/
167 define Package
/lxc-templates
/install
168 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
170 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
171 $(1)/usr
/share
/lxc
/templates
/
174 define Package
/liblxc
/install
175 $(INSTALL_DIR
) $(1)/usr
/lib
/
177 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
181 define Package
/lxc-lua
/install
182 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
184 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
186 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
188 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
189 $(1)/usr
/lib
/lua
/lxc
/
192 define Package
/lxc-init
/install
193 $(INSTALL_DIR
) $(1)/sbin
195 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
200 define Package
/lxc-
$(1)
201 $(call Package
/lxc
/Default
)
202 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
203 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
206 define Package
/lxc-
$(1)/install
207 $(INSTALL_DIR
) $$(1)$(3)
209 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
213 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
217 $(eval
$(call BuildPackage
,lxc
))
218 $(eval
$(call BuildPackage
,lxc-common
))
219 $(eval
$(call BuildPackage
,lxc-hooks
))
220 $(eval
$(call BuildPackage
,lxc-templates
))
221 $(eval
$(call BuildPackage
,liblxc
))
222 $(eval
$(call BuildPackage
,lxc-lua
))
223 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
224 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
225 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))