blob: b0639c29b6af02ebb7e69caaf2847f8ca495d584 (
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
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic linux-info systemd
DESCRIPTION="shared storage lock manager"
HOMEPAGE="https://codeberg.org/sanlock/sanlock"
SRC_URI="https://codeberg.org/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
LICENSE="LGPL-2+ GPL-2 GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="selinux"
DEPEND="
dev-libs/libaio
sys-apps/util-linux
sys-fs/lvm2
"
RDEPEND="
acct-user/${PN}
acct-group/${PN}
selinux? (
sec-policy/selinux-sanlock
)
${DEPEND}
"
PATCHES=(
"${FILESDIR}/sanlock-3.8.4-implicit-func-decls.patch"
)
CONFIG_CHECK="~SOFT_WATCHDOG"
src_compile() {
# -Werror=lto-type-mismatch
# https://bugs.gentoo.org/863734
# https://pagure.io/sanlock/issue/10
filter-lto
for d in wdmd src; do
emake -C ${d}
done
}
src_install() {
for d in wdmd src; do
emake -C ${d} DESTDIR="${D}" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
done
keepdir /var/lib/sanlock
# config
dodir /etc/wdmd.d
dodir /etc/sanlock
insinto /etc/sanlock
doins src/sanlock.conf
# init
newconfd init.d/sanlock.sysconfig sanlock
newconfd init.d/wdmd.sysconfig wdmd
newinitd "${FILESDIR}"/sanlock.initd sanlock
newinitd "${FILESDIR}"/wdmd.initd wdmd
# systemd
local utildir="$(systemd_get_utildir)"
exeinto "${utildir#"${EPREFIX}"}"
doexe init.d/systemd-wdmd
systemd_dounit init.d/sanlock.service
systemd_dounit init.d/wdmd.service
}
|