blob: 98184a6b8781165940732e543d5d6f5147379ad1 (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# kanidm service, the following still needs clarification or work:
#
# * check the systemd units on their preconditions, especially nptd, ...
# as they are a copy of suse service files from https://build.opensuse.org/package/view_file/home:firstyear:kanidm/kanidm:w
#
# if somebody wants to maintain or contribute, just drop a note, i will add you.
# Maintainer: cubi <coyote_x@gmx.de>
# Maintainer: soloturn@gmail.com
_basename=kanidm
pkgbase=kanidm
pkgname=(
$_basename
$_basename-clients
$_basename-server
$_basename-unixd-clients
)
pkgver=1.4.2
_realver=${pkgver/_/-}
pkgrel=2
pkgdesc='A identity management service and clients.'
url='https://github.com/kanidm/kanidm'
source=(
"$_basename-$pkgver.tar.gz::https://github.com/$_basename/$_basename/archive/refs/tags/v${_realver}.tar.gz"
"remove-shadow-from-supplementarygroups.patch"
)
arch=(x86_64 aarch64)
license=(MPL-2.0)
makedepends=(cargo systemd)
options=(!buildflags)
sha256sums=(
'5b8bebb860220cdff95d41c0fa252cf2f8320584d7f825ebdadd94f662c3e923'
'984607ad2a74b24ff1fbb17d3235c0ead2c4ac813b3c1b1df689448e7a28ff6d'
)
build () {
cd ${pkgbase}-$_realver
export KANIDM_BUILD_PROFILE="release_linux"
patch -p0 -i "${srcdir}/remove-shadow-from-supplementarygroups.patch"
cargo build --release --target-dir target \
--package daemon \
--package kanidm-ipa-sync \
--package kanidm_tools \
--package kanidm_unix_int \
--package nss_kanidm \
--package pam_kanidm
}
package_kanidm () {
conflicts=("$_basename-git")
depends=(
"kanidm-server=${pkgver}"
"kanidm-clients=${pkgver}"
"kanidm-unixd-clients=${pkgver}"
)
}
package_kanidm-clients () {
conflicts=("$_basename-clients-git")
provides=("$_basename-clients")
depends=("libgit2")
pkgdesc='kanidm client to interact with kanidm identity management server.'
backup=("etc/kanidm/config")
cd ${pkgbase}-$_realver
install -Dm644 examples/config "${pkgdir}/etc/kanidm/config"
install -Dm755 target/release/kanidm "${pkgdir}/usr/bin/kanidm"
install -Dm644 target/release/build/completions/_kanidm "${pkgdir}/usr/share/zsh/site-functions/_kanidm"
install -Dm644 target/release/build/completions/kanidm.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm.sh"
}
package_kanidm-server () {
conflicts=("$_basename-server-git")
provides=("$_basename-server")
depends=("libgit2")
pkgdesc='kanidm server for idendity management, supports RADIUS, ssh key management.'
backup=("etc/kanidm/server.toml")
cd ${pkgbase}-$_realver
install -Dm644 examples/server.toml "${pkgdir}/etc/kanidm/server.toml"
install -Dm644 platform/opensuse/kanidmd.service "${pkgdir}/usr/lib/systemd/system/kanidmd.service"
install -Dm755 target/release/kanidmd "${pkgdir}/usr/bin/kanidmd"
install -Dm755 target/release/kanidm-ipa-sync "${pkgdir}/usr/bin/kanidm-ipa-sync"
install -Dm644 target/release/build/completions/_kanidmd "${pkgdir}/usr/share/zsh/site-functions/_kanidmd"
install -Dm644 target/release/build/completions/kanidmd.bash "${pkgdir}/usr/share/bash-completion/completions/kanidmd.sh"
# add web-ui files
install -dv "${pkgdir}/usr/share/kanidm/ui/hpkg"
cp -r server/core/static/* "${pkgdir}/usr/share/kanidm/ui/hpkg"
}
package_kanidm-unixd-clients () {
conflicts=("$_basename-unixd-clients-git")
provides=("$_basename-unixd-clients")
pkgdesc='kanidm localhost resolver to resolve posix identities to a kanidm instance.'
backup=("etc/kanidm/unixd")
cd ${pkgbase}-$_realver
install -Dm644 examples/unixd "${pkgdir}/etc/kanidm/unixd"
install -Dm644 platform/opensuse/kanidm-unixd.service "${pkgdir}/usr/lib/systemd/system/kanidm-unixd.service"
install -Dm644 platform/opensuse/kanidm-unixd-tasks.service "${pkgdir}/usr/lib/systemd/system/kanidm-unixd-tasks.service"
install -Dm755 target/release/libnss_kanidm.so "${pkgdir}/usr/lib/libnss_kanidm.so.2"
install -Dm755 target/release/libpam_kanidm.so "${pkgdir}/usr/lib/security/pam_kanidm.so"
install -Dm755 target/release/kanidm_ssh_authorizedkeys "${pkgdir}/usr/bin/kanidm_ssh_authorizedkeys"
install -Dm755 target/release/kanidm_ssh_authorizedkeys_direct "${pkgdir}/usr/bin/kanidm_ssh_authorizedkeys_direct"
install -Dm755 target/release/kanidm-unix "${pkgdir}/usr/bin/kanidm-unix"
install -Dm755 target/release/kanidm_unixd "${pkgdir}/usr/bin/kanidm_unixd"
install -Dm755 target/release/kanidm_unixd_tasks "${pkgdir}/usr/bin/kanidm_unixd_tasks"
install -Dm644 target/release/build/completions/_kanidm_ssh_authorizedkeys_direct "${pkgdir}/usr/share/zsh/site-functions/_kanidm_ssh_authorizedkeys_direct"
install -Dm644 target/release/build/completions/_kanidm_ssh_authorizedkeys "${pkgdir}/usr/share/zsh/site-functions/_kanidm_ssh_authorizedkeys"
install -Dm644 target/release/build/completions/_kanidm_unix "${pkgdir}/usr/share/zsh/site-functions/_kanidm_unix"
install -Dm644 target/release/build/completions/kanidm_ssh_authorizedkeys_direct.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_ssh_authorizedkeys_direct.sh"
install -Dm644 target/release/build/completions/kanidm_ssh_authorizedkeys.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_ssh_authorizedkeys.sh"
install -Dm644 target/release/build/completions/kanidm_unix.bash "${pkgdir}/usr/share/bash-completion/completions/kanidm_unix.sh"
}
|