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
:=Marko Ratkaj
<marko.ratkaj@sartura.hr
>
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=https
://linuxcontainers.org
/downloads
/lxc
/
19 PKG_HASH
:=68663a67450a8d6734e137eac54cc7077209fb15c456eec401a2c26e6386eff6
21 PKG_BUILD_DEPENDS
:=lua
27 include $(INCLUDE_DIR
)/package.mk
30 attach autostart cgroup copy config console create destroy device \
31 execute freeze
info monitor snapshot start stop unfreeze unshare \
32 usernsexec wait top ls
40 DEPENDS_APPLETS
= +libpthread
+libcap
+liblxc
42 DEPENDS_create
= +lxc-configs
+lxc-hooks
+lxc-templates
+flock
44 define Package
/lxc
/Default
47 TITLE
:=LXC userspace tools
48 URL
:=http
://lxc.sourceforge.net
/
52 $(call Package
/lxc
/Default
)
56 define Package
/lxc-auto
57 $(call Package
/lxc
/Default
)
59 DEPENDS
:=+lxc-start
+lxc-stop
62 define Package
/lxc-auto
/description
63 LXC is the userspace control package for Linux Containers
, a lightweight
64 virtual system mechanism sometimes described
as "chroot on steroids".
65 This package adds and initscript for starting and stopping the containers
69 define Package
/lxc-auto
/conffiles
73 define Package
/lxc
/config
74 source
"$(SOURCE)/Config.in"
77 define Package
/lxc
/description
78 LXC is the userspace control package for Linux Containers
, a lightweight
79 virtual system mechanism sometimes described
as "chroot on steroids".
82 define Package
/lxc-common
83 $(call Package
/lxc
/Default
)
84 TITLE
:=LXC common files
88 define Package
/lxc-hooks
89 $(call Package
/lxc
/Default
)
90 TITLE
:=LXC virtual machine hooks
94 define Package
/lxc-templates
95 $(call Package
/lxc
/Default
)
96 TITLE
:=LXC virtual machine templates
100 define Package
/lxc-configs
101 $(call Package
/lxc
/Default
)
102 TITLE
:=LXC virtual machine common config files
106 define Package
/liblxc
107 $(call Package
/lxc
/Default
)
110 TITLE
:=LXC userspace library
111 DEPENDS
:= lxc
+libcap
+libpthread
+LXC_SECCOMP
:libseccomp
114 define Package
/lxc-lua
115 $(call Package
/lxc
/Default
)
116 TITLE
:=LXC Lua bindings
117 DEPENDS
:= lxc
+liblua
+liblxc
120 define Package
/lxc-init
121 $(call Package
/lxc
/Default
)
122 TITLE
:=LXC Lua bindings
123 DEPENDS
:= lxc
+liblxc
131 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
133 ifeq ($(CONFIG_LXC_SECCOMP
),y
)
134 CONFIGURE_ARGS
+= --enable-seccomp
136 CONFIGURE_ARGS
+= --disable-seccomp
140 LUA_INSTALL_CMOD
="/usr/lib/lua" \
141 LUA_INSTALL_LMOD
="/usr/lib/lua"
144 define Build
/InstallDev
145 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
147 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
148 $(1)/usr
/include/lxc
/
150 $(INSTALL_DIR
) $(1)/usr
/lib
152 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
155 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
157 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
158 $(1)/usr
/lib
/pkgconfig
/
162 define Package
/lxc
/install
166 define Package
/lxc-auto
/install
167 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/init.d
168 $(INSTALL_CONF
) .
/files
/lxc-auto.config
$(1)/etc
/config
/lxc-auto
169 $(INSTALL_BIN
) .
/files
/lxc-auto.init
$(1)/etc
/init.d
/lxc-auto
172 define Package
/lxc-common
/conffiles
173 /etc
/lxc
/default.conf
177 define Package
/lxc-common
/install
178 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
180 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
181 $(1)/usr
/lib
/lxc
/rootfs
/
183 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
185 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
188 $(INSTALL_DIR
) $(1)/etc
/lxc
/
190 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
191 $(1)/etc
/lxc
/default.conf
193 $(INSTALL_DIR
) $(1)/etc
/lxc
/
196 $(1)/etc
/lxc
/lxc.conf
198 $(INSTALL_DIR
) $(1)/srv
/lxc
/
201 define Package
/lxc-hooks
/install
202 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
204 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
205 $(1)/usr
/share
/lxc
/hooks
/
208 define Package
/lxc-templates
/install
209 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
211 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
212 $(1)/usr
/share
/lxc
/templates
/
215 define Package
/lxc-configs
/install
216 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
218 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
219 $(1)/usr
/share
/lxc
/config
/
222 define Package
/liblxc
/install
223 $(INSTALL_DIR
) $(1)/usr
/lib
/
225 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
229 define Package
/lxc-lua
/install
230 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
232 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
234 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
236 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
237 $(1)/usr
/lib
/lua
/lxc
/
240 define Package
/lxc-init
/install
241 $(INSTALL_DIR
) $(1)/sbin
243 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
248 define Package
/lxc-
$(1)
249 $(call Package
/lxc
/Default
)
250 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
251 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
254 define Package
/lxc-
$(1)/install
255 $(INSTALL_DIR
) $$(1)$(3)
257 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
261 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
265 $(eval
$(call BuildPackage
,lxc
))
266 $(eval
$(call BuildPackage
,lxc-common
))
267 $(eval
$(call BuildPackage
,lxc-hooks
))
268 $(eval
$(call BuildPackage
,lxc-configs
))
269 $(eval
$(call BuildPackage
,lxc-templates
))
270 $(eval
$(call BuildPackage
,liblxc
))
271 $(eval
$(call BuildPackage
,lxc-lua
))
272 $(eval
$(call BuildPackage
,lxc-init
))
273 $(eval
$(call BuildPackage
,lxc-auto
))
274 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
275 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
276 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))