EAPI=8 inherit cmake DESCRIPTION="Citadel: sign-in, sessions, SSO and permission decisions for the Trunkmasters apps" HOMEPAGE="https://hedronfire.com/" SRC_URI="https://www.hedronfire.com/distfiles/${P}.tar.gz" # The application carries no grant of an open-source license. LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="~amd64" IUSE="+local-postgresql" RESTRICT="mirror bindist" DEPEND=" =dev-libs/boost-1.91.0* =dev-libs/openssl-3.6.5* =dev-db/postgresql-18.6* =dev-cpp/nlohmann_json-3.12.0* =dev-libs/icu-78.3* virtual/libcrypt:= " # The accounts are the r7 package's. Nothing in 0.2.0 uses citadel-agent (node enrollment); # the dependency stays so that replacing r7 changes no account. RDEPEND="${DEPEND} local-postgresql? ( dev-db/postgresql:18 ) acct-group/citadel acct-group/citadel-agent acct-user/citadel acct-user/citadel-agent " BDEPEND="=dev-cpp/catch-3.15.3*" src_configure() { # The project refuses in-source builds and requires an absolute build root. export CITADEL_BUILD_ROOT="${WORKDIR}/build" local mycmakeargs=( -DCITADEL_SANITIZER=none ) cmake_src_configure } src_test() { # The parity suite needs root, PostgreSQL 18 and the r7 reference binary; it runs outside # the Portage sandbox (tests/parity/README.md). cmake_src_test -R '^unit$' } src_install() { cmake_src_install insinto /etc/citadel doins config/callers.example.json newinitd "${ED}"/usr/share/citadel/openrc/citadeld.initd citadeld newconfd "${ED}"/usr/share/citadel/openrc/citadeld.confd citadeld keepdir /var/lib/citadel /var/log/citadel fperms 0750 /etc/citadel /var/lib/citadel /var/log/citadel dodoc README.md } pkg_postinst() { elog "0.8.0 adds each client's email facts (linked domains, active mailbox counts) to the" elog "client-access reads, from the read-only mail reader. No schema change; no migration." elog "0.7.0 adds citadel-admin sync-crm-clients: CRM's locations copied into Citadel's client" elog "list. citadeld is unchanged. To use it, let the citadel role read crm.tenant_resolved" elog "and install the cron job: ${EPREFIX}/usr/share/citadel/cron/citadel-crm-sync (README)." elog "0.6.0 adds Manage's client access routes (/api/v2/access/*) and lets a platform owner or" elog "admin without a client sign in to Manage. No schema change; no migration." elog "0.5.0 adds CRM-peer read-only account link discovery; no service flags or data change." elog "citadeld (C++) serves with the same init script, settings, socket and database as the" elog "Rust 0.1.0-r7. It never migrates at startup; citadel-admin migrate does, explicitly." elog "0.3.0 adds secret storage: citadel-admin secrets-migrate creates its own schema" elog "(citadel_secrets), which r7 ignores; Citadel's own ledger is unchanged." elog "Restart with /etc/init.d/citadeld --nodeps restart to leave its dependents running." }