commit: 0db543c3d7453a107b372529a7a4ead74d7bd7c7 Author: Fco Javier Felix <ffelix <AT> inode64 <DOT> com> AuthorDate: Sun Oct 12 20:41:29 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Oct 18 15:16:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0db543c3
app-antivirus/fangfrisch: Init db in pkg_config and fix deps Signed-off-by: Fco Javier Felix <ffelix <AT> inode64.com> Part-of: https://github.com/gentoo/gentoo/pull/44154 Closes: https://github.com/gentoo/gentoo/pull/44154 Signed-off-by: Sam James <sam <AT> gentoo.org> .../fangfrisch/fangfrisch-1.9.2-r1.ebuild | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/app-antivirus/fangfrisch/fangfrisch-1.9.2-r1.ebuild b/app-antivirus/fangfrisch/fangfrisch-1.9.2-r1.ebuild new file mode 100644 index 000000000000..ecb49e5f22eb --- /dev/null +++ b/app-antivirus/fangfrisch/fangfrisch-1.9.2-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit distutils-r1 readme.gentoo-r1 systemd + +DESCRIPTION="Update and verify unofficial Clam Anti-Virus signatures" +HOMEPAGE="https://github.com/rseichter/fangfrisch https://pypi.org/project/fangfrisch/" +SRC_URI="https://github.com/rseichter/fangfrisch/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +MY_CONF="/etc/${PN}.conf" +MY_DBDIR="/var/lib/${PN}" +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS="See https://rseichter.github.io/fangfrisch/ for the official +documentation. + +### Fresh installations: + +You can now enable /etc/cron.d/${PN} for periodic updates or +systemctl enable --now ${PN}.timer" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +DOCS=(docs/fangfrisch.pdf) +HTML_DOCS=(docs/index.html) + +DEPEND=" + >=dev-python/requests-2.22.0[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-1.4.0[${PYTHON_USEDEP},sqlite] +" +RDEPEND="${DEPEND}" + +distutils_enable_tests unittest + +python_install_all() { + insinto /etc + doins "${FILESDIR}/${PN}.conf" + insinto /etc/cron.d + newins "${FILESDIR}/${PN}.cron" "${PN}" + exeinto /etc + doexe "${FILESDIR}/${PN}-has-news.sh" + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dounit "${FILESDIR}/${PN}.timer" + distutils-r1_python_install_all + readme.gentoo_create_doc + + keepdir "${MY_DBDIR}" + fowners clamav:clamav "${MY_DBDIR}" +} + +pkg_postinst() { + readme.gentoo_print_elog + if [[ ! -e "${EROOT}${MY_DBDIR}/db.sqlite" ]]; then + elog + elog "Execute the following command to finish installation:" + elog + elog "# emerge --config \"=${CATEGORY}/${PF}\"" + fi +} + +pkg_config() { + einfo + einfo "Initializing database." + einfo + + fangfrisch -c "${MY_CONF}" initdb + chown clamav:clamav "${MY_DBDIR}/db.sqlite" +}
