blob: 92451e14fc606a2663e371a57f3eb8db619eac27 (
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=2.0.6
_pkgver=${pkgver/_rc/.rc}
pkgrel=1
pkgdesc="Userspace interface for the Linux kernel containment features"
url="https://linuxcontainers.org/lxc/"
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 libseccomp-dev python3-dev"
options="suid"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lvm::noarch lua5.2-lxc:_lua52
$pkgname-download:_download:noarch $pkgname-templates::noarch $pkgname-libs
py3-$pkgname:_py3"
source="https://github.com/lxc/lxc/archive/lxc-$_pkgver.tar.gz
version.patch
lxc.initd
lxc.conf
download-template-tmpfs.patch
"
builddir="$srcdir/lxc-lxc-$_pkgver"
_tmpldir="usr/share/lxc/templates"
prepare() {
default_prepare || return 1
./autogen.sh
}
build() {
cd "$builddir"
LUA_VERSION=5.2 \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-apparmor \
--enable-lua \
--enable-python \
--with-lua-pc=lua5.2 \
--with-distro=alpine \
--disable-werror \
|| return 1
make VERSION=$pkgver || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
install -Dm755 "$srcdir"/lxc.initd "$pkgdir"/etc/init.d/lxc || return 1
install -d "$pkgdir"/var/lib/lxc
# XXX: workaround for https://github.com/lxc/lxc/issues/1095.
install -Dm644 "$srcdir"/lxc.conf "$pkgdir"/etc/lxc/lxc.conf || return 1
# Remove useless config for SysVinit.
rm -r "$pkgdir"/etc/default
}
lvm() {
pkgdesc="LVM support for LXC"
depends="lvm2 util-linux lxc"
mkdir "$subpkgdir"
}
_lua52() {
pkgdesc="Lua 5.2 module for LXC"
local dir; for dir in lib share; do
mkdir -p "$subpkgdir"/usr/$dir || return 1
mv "$pkgdir"/usr/$dir/lua "$subpkgdir"/usr/$dir/ || return 1
done
}
_py3() {
pkgdesc="Python3 module for LXC"
depends="python3"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python3.5 "$subpkgdir"/usr/lib || return 1
}
_download() {
pkgdesc="LXC container image downloader template"
depends="$pkgname gnupg tar xz"
mkdir -p "$subpkgdir"/$_tmpldir
mv "$pkgdir"/$_tmpldir/lxc-download "$subpkgdir"/$_tmpldir/
}
templates() {
pkgdesc="Templates for LXC (except alpine and download)"
depends="bash tar"
mkdir -p "$subpkgdir"/$_tmpldir
mv "$pkgdir"/$_tmpldir/* "$subpkgdir"/$_tmpldir/ || return 1
# Keep alpine template in the base package (doesn't need bash or GNU tar).
mv "$subpkgdir"/$_tmpldir/lxc-alpine "$pkgdir"/$_tmpldir/
}
dev() {
default_dev || return 1
# fix abuild smartness
mv "$subpkgdir"/usr/bin/lxc-config "$pkgdir"/usr/bin/
}
md5sums="a3deb334fa203b0d5627128f2d3deb07 lxc-2.0.6.tar.gz
79e90616b5049a472ccdcb5b1dcdd8b1 version.patch
7c9d3bb2e5015dd40080de6e18100f2f lxc.initd
032d70c80d3380353223776a5bfe4014 lxc.conf
e8fd932f3ec6d52d7b4c183fc58c0b24 download-template-tmpfs.patch"
sha256sums="8723ef5973a47e7b2c439002c28590d74689e871d36f03089965503c0c0d50b2 lxc-2.0.6.tar.gz
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch
0738606c80cb2185a4eb13ba794d42a80a18fc60f383e7f9cab77de829d3aba6 lxc.initd
06c02a9d21c5160a00c0a92fac222850b97c04f830307692007f264d9344c474 lxc.conf
8cb638f927d51f05884439e6db15092e902a9c59ef830cbdcb07d88f5cff11e1 download-template-tmpfs.patch"
sha512sums="f44c0498876462d78e57d19816eab666e90470badc2bbd38fed9f504e8b21c3e68e4d0f63a8676fa8716be60481befb3db44098228fd71b480972af2b5dcf1e3 lxc-2.0.6.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch
1037e0b773553aa04b619cec7cfc8fa504af830e58c8211eda367da7e36aeb88f45fca1f955a08fc4fa3f9da660017d5fe7145a326a2064cf15e24d1772d9e27 lxc.initd
5b83b0323e58bf00bd1e124c265729499cee97559b6fe18482962e3bed50d121b4c7a09f25cbce7b1e18d4234627bc4b4581ba2060e33cd022f105b4429cef01 lxc.conf
b3b8c47a8594cefff58cef74efe9e6bf0dd8422a40289c4398ea34e61d04dd3d95c567e880a4b123df42ffac3fae179b63b130b357eb6659f73f922f2908d971 download-template-tmpfs.patch"
|