aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/APKBUILD
blob: 53c73044e8e78048fa2fc52922c9fdedf9e8a17f (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=0.8.0
_mypkgver=${pkgver/_rc/-rc}
pkgrel=3
pkgdesc="linux containers - tools"
url="http://lxc.sourceforge.net/"
arch="all"
license="GPL"
depends="bash"
depends_dev="libcap-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://lxc.sourceforge.net/download/lxc/$pkgname-$_mypkgver.tar.gz
	bb-rm.patch
	0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
	lxc.initd
	setup-lxc-template
	setup-lxc-guest
	"

_builddir="${srcdir}/${pkgname}-${_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
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-apparmor \
		|| return 1
	make || return 1
}

package() {
	set -e
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	install -d "$pkgdir"/var/lib/lxc
	install -Dm755 "$srcdir"/lxc-alpine \
		"$pkgdir"/usr/share/lxc/templates/lxc-alpine
	install -Dm755 "$srcdir"/lxc.initd "$pkgdir"/etc/init.d/lxc
	install -Dm755 "$srcdir"/setup-lxc-template \
		"$pkgdir"/usr/bin/setup-lxc-template
	install -Dm755 "$srcdir"/setup-lxc-guest "$pkgdir"/usr/bin/setup-lxc-guest
	set +e
}

md5sums="7304fa57146ce687f749b5df876bb20d  lxc-0.8.0.tar.gz
f0f675456a1751aded10aa428bda9e16  bb-rm.patch
1bf081cd9d66c65f3611ed4af58ef48f  0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
07c0a29753770f6b028891f6549aab71  lxc.initd
45d0f604310e58a1359f1745a4739843  setup-lxc-template
c3f7fd7e85d40c4a4b1b427048ff9652  setup-lxc-guest"