commit:     a937068f32056abdca67f17d47c534d7716e8dd0
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 18 18:23:56 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 19 05:42:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a937068f

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 <AT> gentoo.org>

 sys-cluster/sanlock/Manifest             |  1 +
 sys-cluster/sanlock/sanlock-3.8.4.ebuild | 74 ++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/sys-cluster/sanlock/Manifest b/sys-cluster/sanlock/Manifest
index 10286a4b1bf..03cac489bab 100644
--- a/sys-cluster/sanlock/Manifest
+++ b/sys-cluster/sanlock/Manifest
@@ -1 +1,2 @@
 DIST sanlock-3.8.2.tar.gz 266780 BLAKE2B 
5248d08225bcc2a19594a3dcd3872c8c69ca8b217d31f6263f2717e4594180d4ba4685c9679ce2f31b6a2dcb4fe9f3e6a5dd5ac3ed073aea02599e7bbc04390c
 SHA512 
2fa92e16eee4d2f3dac452400522f7e90b93b71349d322564d5957e2d87fb4bd69f0b5617b05f4b296c272d6da9a404fccadbbfff106354a0e302c436593eaac
+DIST sanlock-3.8.4.tar.gz 270031 BLAKE2B 
da011a15d488849d47fe1043df040580652558918dff9549bf4e6cb4077c03b4aaa8f8de5399dbb0e3f2301ae90c0d20599b25bd5e72bae5317b13f79a352333
 SHA512 
9fca2b18fd3bd504d5186de0b2626ea2c993997528de2384dc042afe52b2b68422a2e4bb79e2409c9e6eccbe5ea8d8939549eb25c5d16aa7fecf6c9a5798340c

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 00000000000..65418ff6411
--- /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
+}

Reply via email to