# Contributor: William Pitcock # Maintainer: Natanael Copa pkgname=lxc pkgver=1.1.0 _mypkgver=${pkgver/_rc/.rc} pkgrel=0 pkgdesc="linux containers - tools" url="http://lxc.sourceforge.net/" arch="all" license="GPL" depends="bash" depends_dev="libcap-dev" makedepends="$depends_dev lvm2 util-linux automake autoconf libtool lua5.2-dev linux-headers" install="" options="suid" subpackages="$pkgname-dev $pkgname-doc $pkgname-lvm lua5.2-lxc:_lua52 $pkgname-templates $pkgname-libs" source="https://github.com/lxc/lxc/archive/lxc-$_mypkgver.tar.gz version.patch lxc.initd " _builddir="${srcdir}/lxc-lxc-${_mypkgver}" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done ./autogen.sh } build() { cd "$_builddir" LUA_VERSION=5.2 \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-apparmor \ --enable-lua \ --with-lua-pc=lua5.2 \ --with-distro=alpine \ || return 1 make VERSION=$pkgver || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -d "$pkgdir"/var/lib/lxc install -Dm755 "$srcdir"/lxc.initd "$pkgdir"/etc/init.d/lxc } lvm() { pkgdesc="linux containers lvm support" depends="lvm2 util-linux lxc" arch="noarch" mkdir "$subpkgdir" } _lua52() { pkgdesc="Lua 5.2 module for LXC" for i in lib share; do mkdir -p "$subpkgdir"/usr/$i || return 1 mv "$pkgdir"/usr/$i/lua "$subpkgdir"/usr/$i/ || return 1 done } templates() { pkgdesc="Templates for LXC" arch="noarch" mkdir -p "$subpkgdir"/usr/share/lxc mv "$pkgdir"/usr/share/lxc/templates "$subpkgdir"/usr/share/lxc/ } dev() { default_dev #fix abuild smartness mv "$subpkgdir"/usr/bin/lxc-config \ "$pkgdir"/usr/bin/ || return 1 } md5sums="02a7865eede1cba5a6bb97c2f5e41b37 lxc-1.1.0.tar.gz 79e90616b5049a472ccdcb5b1dcdd8b1 version.patch 2c21cb054c7f373318e373cfa9e4f78c lxc.initd" sha256sums="216e806f7e18e5bfbc782493a9e44fc255f24a587d6faee94cda848a0b949155 lxc-1.1.0.tar.gz b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch 97606cf912818f7ba099d72cb42b25fee44789c1bfd67f1c0150253e86dc6979 lxc.initd" sha512sums="160da88d6dc96cd9f0679f948bfed057c024adcd459fa4b79e872d12284fa3774ac33a13923c6e150072886a371ccfcdf7ab2c4587efa7f6175fc91a67525c4a lxc-1.1.0.tar.gz e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch bcf73032f2c7d17d457bcd5405071a869dcdeef36ef6b9bf5e13f21d5b4c5e1548a09114dd032863ba91358b74b2a72598bf01e53520185492593c2f4db15ffc lxc.initd"