blob: d837dcbb714554c0d3908357bc09eeca6fb15b19 (
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
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=2.0.3
_mypkgver=${pkgver/_rc/.rc}
pkgrel=0
pkgdesc="linux containers - tools"
url="http://lxc.sourceforge.net/"
arch="all"
license="GPL"
depends="gzip"
depends_dev="libcap-dev"
makedepends="$depends_dev lvm2 util-linux automake autoconf libtool lua5.2-dev
linux-headers bash tar docbook2x"
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
download-template-tmpfs.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"
depends="bash tar"
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="839887923e097df640a40fe6ee842251 lxc-2.0.3.tar.gz
79e90616b5049a472ccdcb5b1dcdd8b1 version.patch
e8fd932f3ec6d52d7b4c183fc58c0b24 download-template-tmpfs.patch
8ffde5bd9bfec77d14a8013c780074ca lxc.initd"
sha256sums="635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 lxc-2.0.3.tar.gz
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch
8cb638f927d51f05884439e6db15092e902a9c59ef830cbdcb07d88f5cff11e1 download-template-tmpfs.patch
dc39d869a2a690f7dcc9186c2707ed6c7ae2cd5248a9c062f3cb0ce4de73295b lxc.initd"
sha512sums="df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef lxc-2.0.3.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch
b3b8c47a8594cefff58cef74efe9e6bf0dd8422a40289c4398ea34e61d04dd3d95c567e880a4b123df42ffac3fae179b63b130b357eb6659f73f922f2908d971 download-template-tmpfs.patch
82c8cdae3cf39a00205bb38a87561ba5b603c046c2438bfd897fc5ee4a2d1d5fde0431cb471f51b2e92cb76f795832ea9cb2f7494e4d67e7131aae2a6d6c29b2 lxc.initd"
|