blob: 42d7c4278602fce01f2df645ba98b54e69b3be70 (
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
|
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=1.0.0
_mypkgver=${pkgver/_rc/.rc}
pkgrel=2
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
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"
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="65676ae30e6eb7e6b20ee51e6f54df06 lxc-1.0.0.tar.gz
79e90616b5049a472ccdcb5b1dcdd8b1 version.patch
013ab9f96e528b94bddacd2b73aca16d lxc.initd"
sha256sums="21c5da23825c502a00f127abbdc5ee42366db6d876cbd7500765b57a5a4767b7 lxc-1.0.0.tar.gz
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch
fd65124a887bf41bfb0ac94c562215bc57b269791922f0a35ee4d6e2a930002d lxc.initd"
sha512sums="6a6ed2bd995cededadb35eac007ea2eb14ff4cb6d10c99bf0466a0f16fa33172393f275b53337f9f00b419b0fa9b6dbbba5d0fe132044a0677fcab33d668974e lxc-1.0.0.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch
7bb47a41aaf9c7afe6769b3700d99d972d44953f0e900841f21644bfaa5f05c8d56494d5400e0cab684235bc947721c5683a8d8407827249a9d25eaca036b122 lxc.initd"
|