summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-10-18 21:23:56 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-10-19 08:42:12 +0300
commita937068f32056abdca67f17d47c534d7716e8dd0 (patch)
tree9862e1e71c7aa8c4a8a72dfe58d39df84e1b2c82 /sys-cluster/sanlock/sanlock-3.8.4.ebuild
parentdev-util/cucumber-create-meta: add 6.0.2 (diff)
downloadgentoo-a937068f32056abdca67f17d47c534d7716e8dd0.tar.gz
gentoo-a937068f32056abdca67f17d47c534d7716e8dd0.tar.bz2
gentoo-a937068f32056abdca67f17d47c534d7716e8dd0.zip
sys-cluster/sanlock: add 3.8.4, enable py3.9, enable py3.10
- EAPI=8 - use CONFIG_CHECK for checking kernel option - use cleaner "emake -C" for running make in dir Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'sys-cluster/sanlock/sanlock-3.8.4.ebuild')
-rw-r--r--sys-cluster/sanlock/sanlock-3.8.4.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/sys-cluster/sanlock/sanlock-3.8.4.ebuild b/sys-cluster/sanlock/sanlock-3.8.4.ebuild
new file mode 100644
index 000000000000..65418ff64118
--- /dev/null
+++ b/sys-cluster/sanlock/sanlock-3.8.4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit linux-info python-r1 systemd
+
+DESCRIPTION="shared storage lock manager"
+HOMEPAGE="https://pagure.io/sanlock"
+SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2+ GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ acct-user/${PN}
+ acct-group/${PN}
+ dev-libs/libaio
+ sys-apps/util-linux
+ python? ( ${PYTHON_DEPS} )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/sanlock-fence_sanlock-LDFLAGS.patch"
+)
+
+CONFIG_CHECK="~SOFT_WATCHDOG"
+
+src_compile() {
+ for d in wdmd src fence_sanlock reset; do
+ emake -C ${d}
+ done
+
+ if use python; then
+ python_foreach_impl emake -C python
+ fi
+}
+
+src_install() {
+ for d in wdmd src fence_sanlock reset; do
+ emake -C ${d} DESTDIR="${D}" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+ done
+
+ if use python; then
+ python_foreach_impl emake -C python DESTDIR="${D}" install
+ fi
+
+ # 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
+ #doinitd ${FILESDIR}/sanlk-resetd.initd
+ #doinitd ${FILESDIR}/fence_sanlockd.initd
+
+ # systemd
+ systemd_newunit init.d/sanlock.service.native sanlock.service
+ sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native || die
+ systemd_newunit init.d/wdmd.service.native wdmd.service
+ systemd_dounit init.d/sanlk-resetd.service
+ #systemd_dounit ${FILESDIR}/fence_sanlockd.service
+}