Skip to content

Commit

Permalink
new package: incus (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwo committed Dec 7, 2023
1 parent 240a974 commit e56b3b8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions srcpkgs/incus/files/incus/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
[ -r conf ] && . ./conf
exec 'incus admin init' --group incus-admin
40 changes: 40 additions & 0 deletions srcpkgs/incus/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Template file for 'incus'
pkgname=incus
version=0.3.0
revision=1
build_style=go
go_import_path=github.com/lxc/incus
go_build_tags=libsqlite3
go_package="${go_import_path}/cmd/incus
${go_import_path}/cmd/fuidshift
${go_import_path}/cmd/lxc-to-incus
${go_import_path}/cmd/incus-benchmark
${go_import_path}/cmd/incus-migrate
${go_import_path}/cmd/incusd
${go_import_path}/cmd/incus-user"
hostmakedepends="pkg-config"
makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel"
depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
short_desc="Powerful system container and virtual machine manager"
maintainer="dkwo <npiazza@disroot.org>"
license="Apache-2.0"
homepage="https://linuxcontainers.org/incus"
distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
system_groups="incus-admin"

export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
export GOFLAGS="-buildmode=pie"

post_build() {
CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
cd cmd/lxd-to-incus && go install -v ./
}

do_check() {
go test -v -skip TestConvertNetworkConfig ./...
}

post_install() {
vsv incus
}

0 comments on commit e56b3b8

Please sign in to comment.