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
132 --with-lua-pc
="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
134 ifeq ($(CONFIG_LXC_SECCOMP
),y
)
135 CONFIGURE_ARGS
+= --enable-seccomp
137 CONFIGURE_ARGS
+= --disable-seccomp
141 LUA_INSTALL_CMOD
="/usr/lib/lua" \
142 LUA_INSTALL_LMOD
="/usr/lib/lua"
145 define Build
/InstallDev
146 $(INSTALL_DIR
) $(1)/usr
/include/lxc
/
148 $(PKG_INSTALL_DIR
)/usr
/include/lxc
/* \
149 $(1)/usr
/include/lxc
/
151 $(INSTALL_DIR
) $(1)/usr
/lib
153 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
156 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
158 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/lxc.
pc \
159 $(1)/usr
/lib
/pkgconfig
/
163 define Package
/lxc
/install
167 define Package
/lxc-auto
/install
168 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/init.d
169 $(INSTALL_CONF
) .
/files
/lxc-auto.config
$(1)/etc
/config
/lxc-auto
170 $(INSTALL_BIN
) .
/files
/lxc-auto.init
$(1)/etc
/init.d
/lxc-auto
173 define Package
/lxc-common
/conffiles
174 /etc
/lxc
/default.conf
178 define Package
/lxc-common
/install
179 $(INSTALL_DIR
) $(1)/usr
/lib
/lxc
/rootfs
181 $(PKG_INSTALL_DIR
)/usr
/lib
/lxc
/rootfs
/README \
182 $(1)/usr
/lib
/lxc
/rootfs
/
184 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
186 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/lxc.functions \
189 $(INSTALL_DIR
) $(1)/etc
/lxc
/
191 $(PKG_INSTALL_DIR
)/etc
/lxc
/default.conf \
192 $(1)/etc
/lxc
/default.conf
194 $(INSTALL_DIR
) $(1)/etc
/lxc
/
197 $(1)/etc
/lxc
/lxc.conf
199 $(INSTALL_DIR
) $(1)/srv
/lxc
/
202 define Package
/lxc-hooks
/install
203 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/hooks
205 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/hooks
/* \
206 $(1)/usr
/share
/lxc
/hooks
/
209 define Package
/lxc-templates
/install
210 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/templates
/
212 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/templates
/lxc-
* \
213 $(1)/usr
/share
/lxc
/templates
/
216 define Package
/lxc-configs
/install
217 $(INSTALL_DIR
) $(1)/usr
/share
/lxc
/config
/
219 $(PKG_INSTALL_DIR
)/usr
/share
/lxc
/config
/* \
220 $(1)/usr
/share
/lxc
/config
/
223 define Package
/liblxc
/install
224 $(INSTALL_DIR
) $(1)/usr
/lib
/
226 $(PKG_INSTALL_DIR
)/usr
/lib
/liblxc.so
* \
230 define Package
/lxc-lua
/install
231 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
233 $(PKG_INSTALL_DIR
)/usr
/share
/lua
/5.1/lxc.lua \
235 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/lxc
237 $(PKG_INSTALL_DIR
)/usr
/lib
/lua
/5.1/lxc
/core.so \
238 $(1)/usr
/lib
/lua
/lxc
/
241 define Package
/lxc-init
/install
242 $(INSTALL_DIR
) $(1)/sbin
244 $(PKG_INSTALL_DIR
)/usr
/sbin
/init.lxc \
249 define Package
/lxc-
$(1)
250 $(call Package
/lxc
/Default
)
251 TITLE
:=Utility lxc-
$(1) from the LXC userspace tools
252 DEPENDS
:= lxc
+lxc-common
$(2) $(DEPENDS_
$(1))
255 define Package
/lxc-
$(1)/install
256 $(INSTALL_DIR
) $$(1)$(3)
258 $(PKG_INSTALL_DIR
)$(3)/lxc-
$(1) \
262 $$(eval
$$(call BuildPackage
,lxc-
$(1)))
266 $(eval
$(call BuildPackage
,lxc
))
267 $(eval
$(call BuildPackage
,lxc-common
))
268 $(eval
$(call BuildPackage
,lxc-hooks
))
269 $(eval
$(call BuildPackage
,lxc-configs
))
270 $(eval
$(call BuildPackage
,lxc-templates
))
271 $(eval
$(call BuildPackage
,liblxc
))
272 $(eval
$(call BuildPackage
,lxc-lua
))
273 $(eval
$(call BuildPackage
,lxc-init
))
274 $(eval
$(call BuildPackage
,lxc-auto
))
275 $(foreach u
,$(LXC_APPLETS_BIN
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/bin")))
276 $(foreach u
,$(LXC_APPLETS_LIB
),$(eval
$(call GenPlugin
,$(u
),$(DEPENDS_APPLETS
),"/usr/lib/lxc")))
277 $(foreach u
,$(LXC_SCRIPTS
),$(eval
$(call GenPlugin
,$(u
),,"/usr/bin")))