2020-01-31 12:21:30 +00:00
|
|
|
# Maintainer: Morten Linderud <foxboron@archlinux.org>
|
|
|
|
# Contributor: Maikel Wever <maikelwever@gmail.com>
|
|
|
|
# Contributor: Asterios Dimitriou <asterios@pci.gr>
|
|
|
|
# Contributor: Benjamin Asbach <archlinux-aur.lxd@impl.it>
|
|
|
|
# Contributer: nightuser <nightuser.android at gmail.com>
|
|
|
|
|
|
|
|
pkgname=lxd
|
|
|
|
_pkgname=lxd
|
|
|
|
_lxd=github.com/lxc/lxd
|
2020-02-14 19:35:35 +00:00
|
|
|
pkgver=3.21
|
2020-02-29 13:53:50 +00:00
|
|
|
pkgrel=2
|
2020-02-03 21:16:55 +00:00
|
|
|
pkgdesc="Daemon based on liblxc offering a REST API to manage containers"
|
2020-01-31 12:21:30 +00:00
|
|
|
arch=('x86_64')
|
2020-02-03 21:16:55 +00:00
|
|
|
url="https://linuxcontainers.org/lxd"
|
2020-01-31 12:21:30 +00:00
|
|
|
license=('APACHE')
|
|
|
|
depends=('lxc' 'lxcfs' 'squashfs-tools' 'dnsmasq' 'dqlite' 'libuv' 'sqlite-replication' 'ebtables')
|
|
|
|
makedepends=('go-pie' 'git' 'tcl' 'apparmor' 'libseccomp')
|
|
|
|
optdepends=(
|
|
|
|
'lvm2: for lvm2 support'
|
|
|
|
'thin-provisioning-tools: for thin provisioning support'
|
|
|
|
'btrfs-progs: for btrfs storage driver support'
|
|
|
|
'ceph: for ceph storage driver support'
|
|
|
|
'cdrtools: VM support'
|
|
|
|
'qemu: VM support'
|
|
|
|
'ovmf: VM support'
|
2020-02-03 21:16:55 +00:00
|
|
|
'systemd-libs: unix device hotplug support'
|
2020-01-31 12:21:30 +00:00
|
|
|
)
|
2020-02-14 19:35:35 +00:00
|
|
|
source=("https://github.com/lxc/lxd/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc}
|
2020-01-31 12:21:30 +00:00
|
|
|
"lxd.socket"
|
|
|
|
"lxd.service"
|
|
|
|
"lxd.sysusers")
|
|
|
|
validpgpkeys=('602F567663E593BCBD14F338C638974D64792D67')
|
2020-02-14 19:35:35 +00:00
|
|
|
sha256sums=('14d976c39f7faa80eb249668982cbf40dd5d6f3edf9879cd3d8ffa604121353f'
|
2020-01-31 12:21:30 +00:00
|
|
|
'SKIP'
|
|
|
|
'3a14638f8d0f9082c7214502421350e3b028db1e7f22e8c3fd35a2b1d9153ef4'
|
2020-02-14 19:35:35 +00:00
|
|
|
'102d1d54186e0fc606a58f030231d76df6bd662b16dfd8f946e1f48e2b473b54'
|
2020-01-31 12:21:30 +00:00
|
|
|
'd0184d9c4bb485e3aad0d4ac25ea7e85ac0f7ed6ddc96333e74fcd393a5b5ec4')
|
|
|
|
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
mkdir -p "${srcdir}/go/src/github.com/lxc"
|
|
|
|
ln -rTsf "${_pkgname}" "${srcdir}/go/src/${_lxd}"
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
export GOPATH="${srcdir}/${pkgname}-${pkgver}/_dist"
|
|
|
|
cd "${GOPATH}/src/${_lxd}"
|
|
|
|
export CGO_CFLAGS="-I/usr/include/sqlite-replication"
|
|
|
|
export CGO_LDFLAGS="-L/usr/lib/sqlite-replication -Wl,-R/usr/lib/sqlite-replication"
|
|
|
|
export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
|
|
|
|
|
|
|
|
mkdir -p bin
|
|
|
|
go build -trimpath -v -tags "netgo" -o bin/ ./lxd-p2c/...
|
|
|
|
go build -trimpath -v -tags "agent" -o bin/ ./lxd-agent/...
|
|
|
|
for tool in fuidshift lxc lxc-to-lxd lxd lxd-benchmark; do
|
|
|
|
go build -trimpath -v -tags "libsqlite3" -o bin/ ./$tool/...
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
|
|
|
for tool in fuidshift lxc lxc-to-lxd lxd lxd-agent lxd-benchmark lxd-p2c; do
|
|
|
|
install -p -Dm755 "bin/$tool" "${pkgdir}/usr/bin/$tool"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Package license
|
|
|
|
install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENCE"
|
|
|
|
|
|
|
|
# systemd files
|
|
|
|
install -Dm644 "${srcdir}/lxd.service" "${pkgdir}/usr/lib/systemd/system/lxd.service"
|
|
|
|
install -Dm644 "${srcdir}/lxd.socket" "${pkgdir}/usr/lib/systemd/system/lxd.socket"
|
|
|
|
|
2020-02-03 21:16:55 +00:00
|
|
|
# logs
|
|
|
|
install -dm755 "${pkgdir}/var/log/lxd"
|
|
|
|
|
2020-01-31 12:21:30 +00:00
|
|
|
# documentation
|
|
|
|
mkdir -p "${pkgdir}/usr/share/doc/lxd"
|
|
|
|
install -p -Dm644 "doc/"* "${pkgdir}/usr/share/doc/lxd/"
|
|
|
|
|
|
|
|
# Bash completions
|
|
|
|
install -p -Dm644 "scripts/bash/lxd-client" "${pkgdir}/usr/share/bash-completion/completions/lxd"
|
|
|
|
|
|
|
|
install -Dm644 "${srcdir}/$pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|