aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/APKBUILD
blob: 63b3a7d98c7e606a15dc766a4950fe4ed9b24636 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=1.0.7
_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"
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

	0001-Support-openvswitch-bridges.patch
	0002-fix-typo.patch
	0003-Update-the-openvswitch-bridge-attach-code.patch
	"

_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="debba05a5d84b632d88a70c36cf97c03  lxc-1.0.7.tar.gz
79e90616b5049a472ccdcb5b1dcdd8b1  version.patch
2c21cb054c7f373318e373cfa9e4f78c  lxc.initd
0800600ea0e9a0a4eab5822e8f14d6a2  0001-Support-openvswitch-bridges.patch
82f16afb2cec1dfca66e4057daf02694  0002-fix-typo.patch
fc502befeee596d5a1cf78d4f294a3e9  0003-Update-the-openvswitch-bridge-attach-code.patch"
sha256sums="a0b1b09592e076e270dcb3ba004616d9ac3147f9de0b78ca39a30f8956b0a8f2  lxc-1.0.7.tar.gz
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9  version.patch
97606cf912818f7ba099d72cb42b25fee44789c1bfd67f1c0150253e86dc6979  lxc.initd
a415aa17655788a49627eb2e06fd06b3f73dfea283a9c67c9bf7029430fcca88  0001-Support-openvswitch-bridges.patch
e6502aa038b18dc4dff7eea6d916215babb8ce775d7c79b2fb7669edcc23ea97  0002-fix-typo.patch
3a63dda403a2fab04fa5d2c9e7762efdcb911cbd913399b8226abdec6643fec9  0003-Update-the-openvswitch-bridge-attach-code.patch"
sha512sums="e6ff42a7b41177e1be0d2cd47d4c554565c7fc35355f3aa8aeba00d4adc7a0f364ecd060ddb6c97b2fe5968329c4e4c4b3cb022bffd2da145f30880f077264a8  lxc-1.0.7.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def  version.patch
bcf73032f2c7d17d457bcd5405071a869dcdeef36ef6b9bf5e13f21d5b4c5e1548a09114dd032863ba91358b74b2a72598bf01e53520185492593c2f4db15ffc  lxc.initd
636dc009496f8648ba10aec6b590c2d1f5db17bf76161fec2b38a7a994198d2ac9c1af7e342f4d3e695d53951b5309447f20155fb79e00489a2f5c0513d08d89  0001-Support-openvswitch-bridges.patch
dc5f5f230df91ea951e231aaedebab8217bcf6a676e2da88f4db3e0b36cdd922fb888c0f6a0eb34d5065add9c002b080c9ac687f9cd16875bd18d4f120f56d6e  0002-fix-typo.patch
c7089b58dc7c4d2fc8cb245c7eb43930bd9e821e136e5461c3f79af063c640076c07d92afd5675cc57bb832e85690d917b87b337d075505a65e154efa7c45bc0  0003-Update-the-openvswitch-bridge-attach-code.patch"