Attempt to bring in lxc

This commit is contained in:
Neale Pickett 2011-09-26 11:51:04 -06:00
parent e001d433ab
commit fb2b4e13bc
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 $@
lxc-build: $(LXC_BUILDDIR)/built
$(LXC_BUILDDIR)/built: $(LXC_BUILDDIR)/source
cd $(LXC_SRCDIR) && ./configure $(LXC_CONF_OPT)
$(MAKE) -C $(LXC_SRCDIR)
$(LXC_BUILDDIR)/built: $(LXC_BUILDDIR)/source libcap-build
cd $(LXC_SRCDIR) && CFLAGS="$(LIBCAP_CFLAGS)" LDFLAGS="$(LIBCAP_LDFLAGS)" ./configure $(CONFIG_XCOMPILE_FLAGS)
$(MAKE) -C $(LXC_SRCDIR) LDFLAGS="-R /opt/lxc/lib"
touch $@
lxc-install: lxc-build
@ -46,4 +46,8 @@ lxc-install: lxc-build
lxc-clean:
rm -rf $(LXC_BUILDDIR)
LIBCAP_PKGDIR = $(TARGET)/libcap
PACKAGES += lxc