blob: 6111cd36c023addd97abba3c2079e435aa1d2c16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
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 "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."
}
|