app-admin/sshguard: add 2.5.0

Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
Yixun Lan
2025-04-29 10:21:51 +08:00
parent 0f2f355a45
commit c9e5e71bbd
2 changed files with 58 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST sshguard-2.4.3.tar.gz 1118756 BLAKE2B 8e3bd297c5712b4a411de6581e96a21db03203974cedba443bf16dd042e3b1b54c68cbacfa5af1610e738e1f847f1f0fae4792b52b618946f8b13fb0f5d4e338 SHA512 eeecea1007c1a21a28835a6d29c2cbffc647b3ab09a3525600e91b978d4ebdda9e6a7e2884da26bb1d7f64de561ac8bd1788bb776730d37b7a4fa49b22885b4a
DIST sshguard-2.5.0.tar.gz 759154 BLAKE2B 4797882942299f0bb7a6c359d152cda3436b86565247cbbda1c26246a21eaa8543baa674d68cbdf153570458fd3295dd3c4a784e5fe4c2e55b1eb8d917cc35a5 SHA512 c03dad46a098ff46d0687d0bc47a7268dfb68462673543e287e028d044b1d3906ae05185a8ef509456c3b7e153a1d21a75408c81e7630ae897525218b3ba09be

View File

@@ -0,0 +1,57 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools systemd
DESCRIPTION="protects hosts from brute force attacks against ssh"
HOMEPAGE="https://www.sshguard.net/"
if [[ "${PV}" == 99999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://bitbucket.org/${PN}/${PN}"
else
SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
fi
LICENSE="BSD"
SLOT="0"
DEPEND="
app-alternatives/lex
"
RDEPEND="
virtual/logger
"
DOCS=(
CHANGELOG.rst
CONTRIBUTING.rst
README.rst
examples/net.sshguard.plist
examples/whitelistfile.example
)
PATCHES=(
"${FILESDIR}"/${PN}-2.4.1-conf.patch
)
src_prepare() {
default
sed -i -e "/ExecStartPre/s:/usr/sbin:/sbin:g" \
-e "/ExecStart/s:/usr/local/sbin:/usr/sbin:g" \
"${S}"/examples/${PN}.service || die
eautoreconf
}
src_install() {
default
newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc
newins examples/sshguard.conf.sample sshguard.conf
systemd_dounit "${S}"/examples/sshguard.service
}