diff --git a/net-dns/blocky/Manifest b/net-dns/blocky/Manifest index cbfdf1469a..6b49aa54ec 100644 --- a/net-dns/blocky/Manifest +++ b/net-dns/blocky/Manifest @@ -1,3 +1,6 @@ DIST blocky-0.22-deps.tar.xz 163869124 BLAKE2B e98614feaeb11604866d08003147871096c993cdb90c85bba46ea999a339570ca1500a80bddee202595372ec5d22baa6ec0345d8cf50ffee6d61dd8d6495d49f SHA512 883e5dd66cf974c6d8c73a94c7677d5003ceb7a3ba68001c2d9d36e1e4d1ea64f0818d30240fe77f192ad3f95ede93127bed9adc9647da07a9b9bebc958ffd33 DIST blocky-0.22-docs.tar.gz 5639822 BLAKE2B e177790deb7493f84d8217661e4e4296004a9db7e00ff8d37dbd3c4ed8b7ba0a7cf431067c103f25784e46ca7a8bf80532cdd8f305f3e4ce119890027f0eb186 SHA512 3eed0ff726479826fbefb4140c36bb26825124134d1fbbecf74a31b2fbdde993630adc645ea2e582ce8d415736cc85b20f64a835c87da98700b715c03d368e75 DIST blocky-0.22.tar.gz 712644 BLAKE2B d74881026421337a0fc32a6af2cf6bff736e0130ac599cd80714f0cafff1e81864e0327bc773f8377106421642cf545b76407fca94f07425c428ff8512a7113b SHA512 928ba882cb567f80b9b00c1ab74ba2fba0324b9e5fb6439789d50d8fd438a26f84772d36f91ef9c3a2351c798a399c15aa1b69927a2da11795edd576b7bae6a4 +DIST blocky-0.23-deps.tar.xz 191529448 BLAKE2B fbad27f70b73832e0862b32267be0e9956c39c570f4e8d16be6a1b7eaa8ea779df52d1da533486d2b0d3e5b163602b62283ac006de4adc0861ec208fd9f50bd8 SHA512 89441e8082260b7c8a850b91029540554fc8af4bdba1996adb07ff57781c0e92ee439b915cd1473d16fba9bd31612b6c267c2fe6f96096a4f9ed4fa23d46165d +DIST blocky-0.23-docs.tar.gz 6773940 BLAKE2B 8114e49c8c8b7c01a1376dd0ef15b5eee966fc18c84d8645aa91c3524876167de810a17d63f2e287a3fe4c56906076783e135cf0c209886870588f40190e9d78 SHA512 aec00c88ea97f7f2d145020e666f77f992b53cd8867d4d4c5bc5a094b06889c35d7019d0e491fe02fb1dd803912613ec7f874f4d7a9f0d06e41c7bb8c609d956 +DIST blocky-0.23.tar.gz 7236537 BLAKE2B 4dd8b4a9587ed2b768ff2cf8809e14242032d7e8be3d3c422eb5518df33c32c0f767ba8e7490f353e81ede8c150cf3175621ea35ad3aa682f62c7d169c511b63 SHA512 22431da4c2f259411b7eb790e8f05a7264d0aa96fe4774722bbe71cf9459a3ed7f434b4b295c95b80f2efc6de55ff645f860443838fe793bc413d74b77e395be diff --git a/net-dns/blocky/blocky-0.23.ebuild b/net-dns/blocky/blocky-0.23.ebuild new file mode 100644 index 0000000000..0852ebf831 --- /dev/null +++ b/net-dns/blocky/blocky-0.23.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fcaps go-module systemd shell-completion + +DESCRIPTION="Fast and lightweight DNS proxy as ad-blocker with many features written in Go" +HOMEPAGE="https://github.com/0xERR0R/blocky/" + +DOCUMENTATION_COMMIT=e9d4e51690f700d20b2cd478eef5987653bd4cc0 + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/0xERR0R/blocky.git" +else + SRC_URI=" + https://github.com/0xERR0R/blocky/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz + doc? ( https://github.com/0xERR0R/blocky/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz ) +" + KEYWORDS="~amd64 ~arm64" +fi + +# main +LICENSE="Apache-2.0" +# deps +LICENSE+=" AGPL-3 BSD-2 BSD ISC MIT MPL-2.0" +SLOT="0" +IUSE="doc" + +RESTRICT="test" + +RDEPEND=" + acct-user/blocky + acct-group/blocky +" + +# PATCHES=( +# "${FILESDIR}"/disable-failed-tests-0.22.patch +# ) + +FILECAPS=( + -m 755 'cap_net_bind_service=+ep' usr/bin/"${PN}" +) + +src_unpack() { + if [[ ${PV} == 9999* ]]; then + git-r3_src_unpack + go-module_live_vendor + if use doc; then + EGIT_BRANCH="gh-pages" + EGIT_CHECKOUT_DIR="${WORKDIR}/${P}-doc" + git-r3_src_unpack + fi + else + go-module_src_unpack + fi +} + +src_compile() { + [[ ${PV} != 9999* ]] && export VERSION="${PV}" + + # mimicking project's Dockerfile + emake GO_SKIP_GENERATE=yes GO_BUILD_FLAGS="-tags static -v " build + + local shell + for shell in bash fish zsh; do + bin/"${PN}" completion "${shell}" > "${PN}"."${shell}" || die + done +} + +src_test() { + # mimcking make test + ego run github.com/onsi/ginkgo/v2/ginkgo --label-filter="!e2e" --coverprofile=coverage.txt --covermode=atomic --cover -r -p + ego tool cover -html coverage.txt -o coverage.html +} + +src_install() { + # primary program + dobin bin/"${PN}" + + # secondary supplements + insinto /etc/"${PN}" + newins docs/config.yml config.yml.sample + + newbashcomp "${PN}".bash "${PN}" + dofishcomp "${PN}".fish + newzshcomp "${PN}".zsh _"${PN}" + + # TODO openrc services + systemd_newunit "${FILESDIR}"/blocky-0.22.service "${PN}".service + + # docs + einstalldocs + + if use doc; then + if [[ ${PV} == 9999* ]]; then + dodoc -r ../"${P}"-doc/main/* + else + dodoc -r ../"${PN}"-"${DOCUMENTATION_COMMIT}"/v"${PV}"/* + fi + fi +} diff --git a/net-dns/blocky/blocky-9999.ebuild b/net-dns/blocky/blocky-9999.ebuild index 3f5b49b9fc..0852ebf831 100644 --- a/net-dns/blocky/blocky-9999.ebuild +++ b/net-dns/blocky/blocky-9999.ebuild @@ -8,7 +8,7 @@ inherit fcaps go-module systemd shell-completion DESCRIPTION="Fast and lightweight DNS proxy as ad-blocker with many features written in Go" HOMEPAGE="https://github.com/0xERR0R/blocky/" -DOCUMENTATION_COMMIT=9c6a86eb163e758686c5d6d4d5259deb086a8aa9 +DOCUMENTATION_COMMIT=e9d4e51690f700d20b2cd478eef5987653bd4cc0 if [[ ${PV} == 9999* ]]; then inherit git-r3 @@ -19,7 +19,7 @@ else https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz doc? ( https://github.com/0xERR0R/blocky/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz ) " - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~arm64" fi # main