2020-01-31 12:21:30 +00:00
|
|
|
# Maintainer: Morten Linderud <foxboron@archlinux.org>
|
2021-09-04 02:11:00 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
2020-01-31 12:21:30 +00:00
|
|
|
# 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
|
2022-08-20 01:13:42 +00:00
|
|
|
pkgver=5.5
|
2022-05-27 18:21:57 +00:00
|
|
|
pkgrel=1
|
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')
|
2020-09-21 07:25:08 +00:00
|
|
|
depends=('lxc' 'lxcfs' 'squashfs-tools' 'dnsmasq' 'dqlite' 'libuv' 'ebtables')
|
2020-07-02 20:22:52 +00:00
|
|
|
makedepends=('go' 'git' 'tcl' 'apparmor' 'libseccomp' 'systemd')
|
2020-01-31 12:21:30 +00:00
|
|
|
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'
|
2022-05-03 07:46:05 +00:00
|
|
|
'qemu: VM support'
|
|
|
|
'edk2-ovmf: VM support'
|
2020-02-03 21:16:55 +00:00
|
|
|
'systemd-libs: unix device hotplug support'
|
2020-08-03 13:56:08 +00:00
|
|
|
'apparmor: apparmor support'
|
2020-01-31 12:21:30 +00:00
|
|
|
)
|
2020-08-28 15:39:07 +00:00
|
|
|
source=("https://linuxcontainers.org/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc}
|
2020-01-31 12:21:30 +00:00
|
|
|
"lxd.socket"
|
|
|
|
"lxd.service"
|
|
|
|
"lxd.sysusers")
|
|
|
|
validpgpkeys=('602F567663E593BCBD14F338C638974D64792D67')
|
2022-08-20 01:13:42 +00:00
|
|
|
sha256sums=('462e66c03b5eb08eaf3a3b5be4be73043e3af63218c79af100989bd018daf29b'
|
2020-01-31 12:21:30 +00:00
|
|
|
'SKIP'
|
2022-02-12 12:55:57 +00:00
|
|
|
'b89a725223ef72b25eab25184084d069af312f8c23612c57fdb75427a510232e'
|
2020-02-14 19:35:35 +00:00
|
|
|
'102d1d54186e0fc606a58f030231d76df6bd662b16dfd8f946e1f48e2b473b54'
|
2020-01-31 12:21:30 +00:00
|
|
|
'd0184d9c4bb485e3aad0d4ac25ea7e85ac0f7ed6ddc96333e74fcd393a5b5ec4')
|
|
|
|
|
|
|
|
prepare() {
|
2021-09-04 02:11:00 +00:00
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
|
|
|
mkdir bin
|
|
|
|
go mod verify
|
2020-01-31 12:21:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2021-09-04 02:11:00 +00:00
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
2020-04-22 22:25:33 +00:00
|
|
|
export GOFLAGS="-buildmode=pie -trimpath"
|
2021-07-10 09:52:42 +00:00
|
|
|
export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
|
2020-01-31 12:21:30 +00:00
|
|
|
|
2022-02-12 12:55:57 +00:00
|
|
|
go build -v -tags "netgo" -o bin/ ./lxd-migrate/...
|
|
|
|
CGO_LDFLAGS="$CGO_LDFLAGS -static" go build -v -tags "agent" -o bin/ ./lxd-agent/...
|
|
|
|
for tool in fuidshift lxc lxc-to-lxd lxd lxd-benchmark lxd-user; do
|
2020-04-22 22:25:33 +00:00
|
|
|
go build -v -tags "libsqlite3" -o bin/ ./$tool/...
|
2020-01-31 12:21:30 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
2022-02-12 12:55:57 +00:00
|
|
|
for tool in fuidshift lxc lxc-to-lxd lxd lxd-agent lxd-benchmark lxd-migrate lxd-user; do
|
|
|
|
install -v -p -Dm755 "bin/$tool" "${pkgdir}/usr/bin/$tool"
|
2020-01-31 12:21:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Package license
|
2022-02-12 12:55:57 +00:00
|
|
|
install -v -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
|
2020-01-31 12:21:30 +00:00
|
|
|
|
|
|
|
# systemd files
|
2022-02-12 12:55:57 +00:00
|
|
|
install -v -Dm644 "${srcdir}/"lxd.{service,socket} -t "${pkgdir}/usr/lib/systemd/system"
|
|
|
|
install -v -Dm644 "${srcdir}/$pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
|
2020-01-31 12:21:30 +00:00
|
|
|
|
2020-02-03 21:16:55 +00:00
|
|
|
# logs
|
2022-02-12 12:55:57 +00:00
|
|
|
install -v -dm700 "${pkgdir}/var/log/lxd"
|
2020-02-03 21:16:55 +00:00
|
|
|
|
2020-01-31 12:21:30 +00:00
|
|
|
# documentation
|
2022-05-02 22:53:06 +00:00
|
|
|
install -d "${pkgdir}/usr/share/doc/lxd/"
|
2022-02-12 12:55:57 +00:00
|
|
|
rm -rf doc/html
|
2022-05-02 22:53:06 +00:00
|
|
|
cp -vr doc/* "${pkgdir}/usr/share/doc/lxd/"
|
2020-01-31 12:21:30 +00:00
|
|
|
|
|
|
|
# Bash completions
|
2022-02-12 12:55:57 +00:00
|
|
|
install -v -p -Dm644 "scripts/bash/lxd-client" "${pkgdir}/usr/share/bash-completion/completions/lxd"
|
2020-01-31 12:21:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|