blob: f74d8ea1fa532509312f26b6f46e8aeff446c7a1 (
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
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lxd
pkgver=3.2
pkgrel=0
pkgdesc="a container hypervisor and a new user experience for LXC"
url="https://linuxcontainers.org/lxd/"
arch="all"
license="Apache-2.0"
depends="acl xz netcat-openbsd cgmanager squashfs-tools rsync shadow-uidmap lxc ip6tables dnsmasq ca-certificates"
makedepends="lxc-dev protobuf-dev rsync go gettext-dev linux-headers acl-dev"
subpackages="$pkgname-scripts:scripts:noarch $pkgname-bash-completion:bashcomp:noarch $pkgname-openrc"
install="$pkgname.pre-install"
options="!check"
source="https://linuxcontainers.org/downloads/$pkgname/$pkgname-$pkgver.tar.gz
lxd-dont-go-get.patch
$pkgname.confd
$pkgname.initd"
_project="github.com/lxc/lxd"
builddir="$srcdir"/lxd-$pkgver
prepare() {
default_prepare
cd "$builddir"
# symlink links to a path outside of $GOPATH
# copy src to project directory to replace the symlink
rm -f dist/src/"$_project"
rsync -a . --exclude="dist" dist/src/"$_project"
}
build() {
cd "$builddir"
export GOPATH="$builddir/dist"
#https://github.com/lxc/lxd/issues/496
export CGO_LDFLAGS=-lintl
make -C dist/src/"$_project"
}
package() {
cd "$builddir"
for i in fuidshift lxc ; do
install -Dm 755 "dist/bin/$i" \
"$pkgdir/usr/bin/$i"
done
install -Dm755 "dist/bin/lxd" "$pkgdir/usr/sbin/lxd"
install -Dm755 "$srcdir"/lxd.initd \
"$pkgdir"/etc/init.d/lxd
install -Dm644 "$srcdir"/lxd.confd \
"$pkgdir"/etc/conf.d/lxd
}
bashcomp() {
depends="bash"
pkgdesc="Bash completions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
cp scripts/bash/lxd-client "$subpkgdir"/usr/share/bash-completion/completions/lxd-client
}
scripts() {
pkgdesc="LXD scripts"
depends="$pkgname python3 py3-lxc"
cd "$builddir"
install -Dm755 scripts/lxc-to-lxd \
"$subpkgdir/usr/sbin/lxc-to-lxd"
}
sha512sums="82c37e87d75e328a29b1f2876a24fedec43a253bb72f3ea55fa9cdb928d11947eda723a01e758f90ef77ed4492f86ec6dd5f1f88240d05e771d926dfdc9888fb lxd-3.2.tar.gz
e2c0c96d0efc33e459cf14365f01d60b73ed03f028d36ca5ea27cd647f5d2a91ec61bcf2723437f7b930aec6ebabac3697e0e3adc6b2918817833c9f182aab49 lxd-dont-go-get.patch
bc32c71f2ce10f508433e1e4651c08c18e8a17e9419a7ce391c0f127fc7cf378c665178926b35eae8813e290d9c5eab3ceb605679fd32efdf2cf98a57cee4127 lxd.confd
94de0c0d5ab63463a929a4151359950b1117d0ada5ccf0944311cc70c6b6d4c437ccb4158734ab35db67bfb4abc437074c3f3515be4531f63adc74da21fefb5b lxd.initd"
|