summaryrefslogtreecommitdiffstats
path: root/main/lxc/APKBUILD
blob: 7f2cb0807d007ee842ecc9a4386a36fd76e9a16a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=1.0.0_rc4
_mypkgver=${pkgver/_rc/.rc}
pkgrel=1
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"
install=""
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-lua-Do-not-link-Lua-module-to-the-Lua-core-library.patch
	0002-lxc-alpine-add-support-for-architecture-arm.patch
	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"
	mkdir -p "$subpkgdir"/usr/share/lxc
	mv "$pkgdir"/usr/share/lxc/templates "$subpkgdir"/usr/share/lxc/
}


md5sums="6d9297d795dedc28c89e8517dc620872  lxc-1.0.0.rc4.tar.gz
5efd75de6d122e1a1734537e96a4bd7c  0001-lua-Do-not-link-Lua-module-to-the-Lua-core-library.patch
9fda3e60b50507139856fec83f7ec036  0002-lxc-alpine-add-support-for-architecture-arm.patch
79e90616b5049a472ccdcb5b1dcdd8b1  version.patch
9f780f761dcaec3ce40d083c6df044d4  lxc.initd"
sha256sums="7b39c519b8eca6e502453f7e494ac6ce55b0850d526e1ed12ba9f44ef548b2fe  lxc-1.0.0.rc4.tar.gz
a245d3c218fba2f281c7326f3f25e67f82fcbdee78bd7588c2f57c0593550a77  0001-lua-Do-not-link-Lua-module-to-the-Lua-core-library.patch
d2a266cbe7f877e41406381079a9d2a24151e0532d61ad3a6630bcbb3106bc52  0002-lxc-alpine-add-support-for-architecture-arm.patch
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9  version.patch
8bdb64ecf100b648396456f6765230aab8649665bfcf320baede529ce6c5484d  lxc.initd"
sha512sums="838d709c96002426069f8eea9c2153f06fe964516998408753ffefdcdefc16c30819c0c40923572f842f7448403134c3cbbc46a6bd17085e16d410bce402ba39  lxc-1.0.0.rc4.tar.gz
910d37d794435753c69729e83f258ed7f6acc38b5d8c07446bc5937b2ebacb09cc0282ed8f24bbf587236e0dfbad81e40860a2b9bf24c868df867b9cebb24f20  0001-lua-Do-not-link-Lua-module-to-the-Lua-core-library.patch
16429f40fa3a6a8dc7f4198cc780f4003c14fd67a2796c09624ef951f879d238f345ab5a645c4c4ab1f029626e2d3f9e7c237378188b7c92b5af289987eee50e  0002-lxc-alpine-add-support-for-architecture-arm.patch
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def  version.patch
e3aa39c60db6ba73cbe3fcb27170dd83a03a0a175d8a28513f242a81eef5cb0e90b78dc63fc8da5c7160e60bc780111679fd6d0e401a0d6626e574c328c5afb0  lxc.initd"