Attempt to bring in lxc

This commit is contained in:
Neale Pickett 2011-09-26 11:51:04 -06:00
parent 7fbe6d2650
commit 45c52d73f8
2 changed files with 35 additions and 3 deletions

28
packages/libcap/libcap.mk Normal file
View File

@ -0,0 +1,28 @@
LIBCAP_PKGDIR = $(TARGET)/libcap
LIBCAP_BUILDDIR = $(BUILD)/libcap
LIBCAP_VERSION = 2.22
LIBCAP_TAR = $(CACHE)/libcap-$(LIBCAP_VERSION).tar.gz
# XXX: kernel.org was down when I wrote this, but is the canonical source
LIBCAP_URL = http://ftp.debian.org/debian/pool/main/libc/libcap2/libcap2_$(LIBCAP_VERSION).orig.tar.gz
LIBCAP_SRCDIR = $(LIBCAP_BUILDDIR)/libcap-$(LIBCAP_VERSION)
LIBCAP_LDOPTS = -L$(CURDIR)/$(LIBCAP_SRCDIR)/libcap
LIBCAP_CFLAGS = -I$(CURDIR)/$(LIBCAP_SRCDIR)/libcap/include
$(LIBCAP_TAR):
mkdir -p $(@D)
wget -O $@ $(LIBCAP_URL)
libcap-source: $(LIBCAP_BUILDDIR)/source
$(LIBCAP_BUILDDIR)/source: $(LIBCAP_TAR)
mkdir -p $(@D)
zcat $< | ( cd $(@D) && tar xf -)
touch $@
# This library's build sort of blows.
libcap-build: $(LIBCAP_BUILDDIR)/built
$(LIBCAP_BUILDDIR)/built: $(LIBCAP_BUILDDIR)/source
$(MAKE) -C $(LIBCAP_SRCDIR)/libcap _makenames
$(MAKE) -C $(LIBCAP_SRCDIR) CC=$(CC)
touch $@

View File

@ -29,9 +29,9 @@ $(LXC_BUILDDIR)/source: $(LXC_TAR)
touch $@ touch $@
lxc-build: $(LXC_BUILDDIR)/built lxc-build: $(LXC_BUILDDIR)/built
$(LXC_BUILDDIR)/built: $(LXC_BUILDDIR)/source $(LXC_BUILDDIR)/built: $(LXC_BUILDDIR)/source libcap-build
cd $(LXC_SRCDIR) && ./configure $(LXC_CONF_OPT) cd $(LXC_SRCDIR) && CFLAGS="$(LIBCAP_CFLAGS)" LDFLAGS="$(LIBCAP_LDFLAGS)" ./configure $(CONFIG_XCOMPILE_FLAGS)
$(MAKE) -C $(LXC_SRCDIR) $(MAKE) -C $(LXC_SRCDIR) LDFLAGS="-R /opt/lxc/lib"
touch $@ touch $@
lxc-install: lxc-build lxc-install: lxc-build
@ -46,4 +46,8 @@ lxc-install: lxc-build
lxc-clean: lxc-clean:
rm -rf $(LXC_BUILDDIR) rm -rf $(LXC_BUILDDIR)
LIBCAP_PKGDIR = $(TARGET)/libcap
PACKAGES += lxc PACKAGES += lxc