version bump net-nds/kanidm-1.10.0
This commit is contained in:
147
net-nds/kanidm/kanidm-1.10.0.ebuild
Normal file
147
net-nds/kanidm/kanidm-1.10.0.ebuild
Normal file
@@ -0,0 +1,147 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Autogenerated by pycargoebuild 0.15.1
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
|
||||
inherit cargo shell-completion systemd
|
||||
|
||||
DESCRIPTION="Kanidm - a modern and simple identity management platform"
|
||||
HOMEPAGE="https://github.com/kanidm/kanidm/"
|
||||
SRC_URI="
|
||||
${CARGO_CRATE_URIS}
|
||||
https://github.com/kanidm/kanidm/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
if [[ ${PKGBUMPING} != ${PVR} ]]; then
|
||||
SRC_URI+="
|
||||
kanidmd-1.10.0-crates.tar.xz
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="MPL-2.0"
|
||||
# Dependent crate licenses
|
||||
LICENSE+="
|
||||
0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0
|
||||
CDLA-Permissive-2.0 ISC LGPL-3 MIT MIT-0 MPL-2.0 MPL-2.0 Unicode-3.0
|
||||
ZLIB
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+acct pam server tpm"
|
||||
RUST_MIN_VER="1.93"
|
||||
|
||||
DEPEND="
|
||||
acct? (
|
||||
server? (
|
||||
acct-group/kanidm
|
||||
acct-user/kanidm )
|
||||
)
|
||||
pam? ( sys-libs/pam )
|
||||
tpm? ( app-crypt/tpm2-tss )
|
||||
"
|
||||
BDEPEND="
|
||||
llvm-core/clang
|
||||
llvm-core/lld
|
||||
sys-devel/binutils
|
||||
>=dev-lang/rust-bin-1.90.0
|
||||
tpm? ( dev-util/pkgconf )
|
||||
server? ( sys-libs/libcap )
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
export KANIDM_BUILD_PROFILE=release_linux
|
||||
rust_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
echo "ECARGO_ARGS: ${ECARGO_ARGS}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myfeatures=(
|
||||
$(usev tpm)
|
||||
unix
|
||||
)
|
||||
cargo_src_configure \
|
||||
--package daemon \
|
||||
--package kanidm-ipa-sync \
|
||||
--package kanidm-ldap-sync \
|
||||
--package kanidm_tools \
|
||||
--package kanidm_unix_int \
|
||||
--package nss_kanidm \
|
||||
--package pam_kanidm
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin target/release/kanidm-unix
|
||||
dobin target/release/kanidm_unixd
|
||||
dobin target/release/kanidm_unixd_tasks
|
||||
dobin target/release/kanidm_ssh_authorizedkeys
|
||||
dobin target/release/kanidm_ssh_authorizedkeys_direct
|
||||
|
||||
dolib.so target/release/libnss_kanidm.so
|
||||
dolib.so target/release/libpam_kanidm.so
|
||||
|
||||
insinto /lib64/security
|
||||
use pam && newins target/release/libpam_kanidm.so pam_kanidm.so
|
||||
|
||||
insinto /etc/kanidm
|
||||
newins examples/kanidm config
|
||||
newins examples/radius_full.toml radius.toml
|
||||
doins examples/unixd
|
||||
fperms 0644 /etc/kanidm/{,config,radius.toml,unixd}
|
||||
|
||||
for d in "kanidm" "kanidm_ssh_authorizedkeys" "kanidm_ssh_authorizedkeys_direct" "kanidm-unix" ; do
|
||||
dobin target/release/${d}
|
||||
dcp="${d/-/_}"
|
||||
newbashcomp target/release/build/completions/${dcp}.bash ${dcp}
|
||||
dofishcomp target/release/build/completions/${dcp}.fish
|
||||
dozshcomp target/release/build/completions/_${dcp}
|
||||
done
|
||||
systemd_dounit platform/opensuse/kanidm-unixd.service
|
||||
systemd_dounit platform/opensuse/kanidm-unixd-tasks.service
|
||||
|
||||
if use server; then
|
||||
einfo "Installing kanidmd-server"
|
||||
dobin target/release/kanidmd
|
||||
dobin target/release/kanidm-ipa-sync
|
||||
dobin target/release/kanidm-ldap-sync
|
||||
# -- setting NET-BIND
|
||||
SETCAP="setcap cap_net_bind_service=+ep"
|
||||
${SETCAP} "${D}/usr/bin/kanidmd"
|
||||
|
||||
newins examples/server.toml server.toml
|
||||
|
||||
dodir /usr/share/kanidm/ui/hpkg
|
||||
cp -r ${S}/server/core/static/* ${D}/usr/share/kanidm/ui/hpkg || die "Install failed!"
|
||||
chown -R root:root ${D}/usr/share/kanidm/ui
|
||||
|
||||
systemd_dounit platform/opensuse/kanidm-ipa-sync.service
|
||||
systemd_dounit platform/opensuse/kanidmd.service
|
||||
|
||||
newinitd "${FILESDIR}/kanidm.initd" kanidmd
|
||||
|
||||
newbashcomp target/release/build/completions/kanidmd.bash kanidmd
|
||||
dofishcomp target/release/build/completions/kanidmd.fish
|
||||
dozshcomp target/release/build/completions/_kanidmd
|
||||
cp -r ${S}/examples/migrations ${D}/etc/kanidm/migrations.d
|
||||
fi
|
||||
|
||||
|
||||
if use acct; then
|
||||
if use server; then
|
||||
fowners root:kanidm /etc/kanidm/server.toml
|
||||
fperms 0640 /etc/kanidm/server.toml
|
||||
diropts -m0740 -o kanidm -g kanidm
|
||||
keepdir /var/lib/private/kanidm
|
||||
keepdir /var/log/kanidmd
|
||||
fi
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
Reference in New Issue
Block a user