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
/config
53 source
"$(SOURCE)/Config.in"
56 define Package
/lxc
/description
57 LXC is the userspace control package for Linux Containers
, a lightweight
58 virtual system mechanism sometimes described
as "chroot on steroids".
61 define Package
/lxc-common
62 $(call Package
/lxc
/Default
)
63 TITLE
:=LXC common files
67 define Package
/lxc-hooks
68 $(call Package
/lxc
/Default
)
69 TITLE
:=LXC virtual machine hooks
73 define Package
/lxc-templates
74 $(call Package
/lxc
/Default
)
75 TITLE
:=LXC virtual machine templates
80 $(call Package
/lxc
/Default
)
83 TITLE
:=LXC userspace library
84 DEPENDS
:= lxc
+libcap
+libpthread
87 define Package
/lxc-lua
88 $(call Package
/lxc
/Default
)
89 TITLE
:=LXC Lua bindings
90 DEPENDS
:= lxc
+liblua
+liblxc
+luafilesystem
93 define Package
/lxc-init
94 $(call Package
/lxc
/Default
)
95 TITLE
:=LXC Lua bindings
105 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" \
108 LUA_INSTALL_CMOD
="/usr/lib/lua" \
109 LUA_INSTALL_LMOD
="/usr/lib/lua"
111 define Build
/Configure
112 ( cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
113 $(call Build
/Configure
/Default
)
117 define Build
/InstallDev
118 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
120 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
121 $(1)/usr
/include/lxc
/
123 $(INSTALL_DIR
) $(1)/usr
/lib
125 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
128 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
130 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
131 $(1)/usr
/lib
/pkgconfig
/
135 define Package
/lxc
/install
139 define Package
/lxc-common
/conffiles
140 /etc
/lxc
/default.conf
144 define Package
/lxc-common
/install
145 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
147 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
148 $(1)/usr
/lib
/lxc
/rootfs
/
150 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
152 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
155 $(INSTALL_DIR
) $(1)/etc
/lxc
/
157 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
161 define Package
/lxc-hooks
/install
162 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
164 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountcgroups \
165 $(1)/usr
/share
/lxc
/hooks
/
167 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/mountecryptfsroot \
168 $(1)/usr
/share
/lxc
/hooks
/
171 define Package
/lxc-templates
/install
172 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
174 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
175 $(1)/usr
/share
/lxc
/templates
/
178 define Package
/liblxc
/install
179 $(INSTALL_DIR
) $(1)/usr
/lib
/
181 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
185 define Package
/lxc-lua
/install
186 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
188 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
190 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
192 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
193 $(1)/usr
/lib
/lua
/lxc
/
196 define Package
/lxc-init
/install
197 $(INSTALL_DIR
) $(1)/sbin
199 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
204 define Package
/lxc-
$(1)
205 $(call Package
/lxc
/Default
)
206 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
207 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
210 define Package
/lxc-
$(1)/install
211 $(INSTALL_DIR
) $$(1)$(3)
213 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
217 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
221 $(eval
$(call BuildPackage
,lxc
))
222 $(eval
$(call BuildPackage
,lxc-common
))
223 $(eval
$(call BuildPackage
,lxc-hooks
))
224 $(eval
$(call BuildPackage
,lxc-templates
))
225 $(eval
$(call BuildPackage
,liblxc
))
226 $(eval
$(call BuildPackage
,lxc-lua
))
227 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
228 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
229 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))