# Contributor: Ɓukasz Jendrysik # Contributor: William Pitcock # Maintainer: Natanael Copa pkgname=lxc pkgver=1.1.3 _mypkgver=${pkgver/_rc/.rc} pkgrel=2 pkgdesc="linux containers - tools" url="http://lxc.sourceforge.net/" arch="all" license="GPL" depends="bash gzip" 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 0001-Clone-bridge-interface-MTU-setting.patch version.patch CVE-2015-1335.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="680198729359bd5e58dc14ce617e72b1 lxc-1.1.3.tar.gz d41088af5dee2e2df7975bb33d5d1537 0001-Clone-bridge-interface-MTU-setting.patch 79e90616b5049a472ccdcb5b1dcdd8b1 version.patch 7327d4e94f1f23473d82c1fe98706eb2 CVE-2015-1335.patch 1e47412382517ee2adcbca00f07377ca lxc.initd" sha256sums="b75fb8e376d3313e152f31fb7372b68f33a953a12191a39de4cded04fff94300 lxc-1.1.3.tar.gz e9a6c2e5f98a5f03bf772333c91efe7dafbc4f8d699dced73859e7d6c98d2d42 0001-Clone-bridge-interface-MTU-setting.patch b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch 85af34f968ed1e00de357c2ff6d3234c144f53878a707d1d5f8d864407f23726 CVE-2015-1335.patch ce4c30c65832c4b79df1c3c1ef6a444247e2866ab24690f1476e7b98b722fac1 lxc.initd" sha512sums="cafa4fbe4fe23b8c0b98007a79f20899c4a3b98c51d797b9c16e38dfec1eee5a513b58621308fe6551707d38028d9e5bd78ade8822691ffe4a7a369b10a48dda lxc-1.1.3.tar.gz 6c4dc0a53ba8947a37faa14bb81a7bbed7a88fb118513842f5a5a37e9d23fbd2bee4f8f513d3f686a34d373869008ee5ccbd4b9e20615d4b9e4b8139119adce3 0001-Clone-bridge-interface-MTU-setting.patch e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch d8b0a7827a96a4d5c10e7ebf7ca65f415f6895d3b6371cfc1edda2a9a07ea99b9d3db5d8e5cc542ad88b25e717534755faa9938901183a90c7587d83d3fa81aa CVE-2015-1335.patch 4ff815d354f022854535a0069033f314263623ead48220d732683d5a268f14f221cbfe1aa9515adf1c2e47de71f1b1f1dda374a1f5f15d6f7025d2de91143d9a lxc.initd"