net-dns/blocky: update to 0.26.2

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
This commit is contained in:
Rahil Bhimjiani
2025-07-07 11:55:54 +05:30
parent 931a54e820
commit 7143f153d3
3 changed files with 109 additions and 1 deletions

View File

@@ -7,3 +7,6 @@ DIST blocky-0.24.tar.gz 7246810 BLAKE2B ec6ddbdab6f77f039e5b79e4092239ae17b00365
DIST blocky-0.25-deps.tar.xz 6060720 BLAKE2B 1cb52169ba9e23c209ca9af4ef7199491dd0844342cd6baf6ca01db71ac03a5b94866356417627eb21ff644602d93344fd6666d5d0ffbbe578be8d300eb3d882 SHA512 1cbc8c12b71ab0cd81d86a0ce3e1466ac80d3ae1ec842f73f3de60d40fff84fb89f22d7aa6a0b75e5f725e2b12a614d27290c62ae192fb2746d847ff59192369
DIST blocky-0.25-docs.tar.gz 8494233 BLAKE2B 1ed628a51d2baefa0926131aa533385aa83e1113252532ba8a58782cd33a018f0813c78284949dd67ed366d2a166cdf2866aef70fb1631bd42376b129d35bb60 SHA512 443bffd1f142286405a281895ecab01d37306fd68e754f977b6da71648c784fcbb9f45161e8c2403bf032a40a8d3ff3884dfbd578650a70eceed20624df8b8cc
DIST blocky-0.25.tar.gz 7253485 BLAKE2B 64b650e17370f79a97e420737e8df2a5a733c5d52a037d1b7c37d25d042e6a237f84e787b8230bb7c95a6ee085978107403afd1896f9b7a7318ed08c2a2fce12 SHA512 77fefcf6936c10a7d8b4b27ce5447ad6b2b15637337a7d0a9256c19cf893e3b32c5843236e30c9b302fb3c9fa69c73a82ea1e4ad33162ac3a07913215771d4f9
DIST blocky-0.26.2-deps.tar.xz 6395916 BLAKE2B 4fe58df418c002377539ae497e60a244cdfda06c0a6b7ade1c792476dd2df02bb3d87802e2fa2ce198a8543caaacb18aca60161142473ec983ec6881a7c553c6 SHA512 dd577f2915c5fa340fbd1f5d0ab71418867480c947ed0afbdbac3d0fa1961dd0093093f527b3e984b954e0ed551ca345f56851a36d48ed7f69381cbcf2293d3a
DIST blocky-0.26.2-docs.tar.gz 11939910 BLAKE2B cd8fc7ea20324e92f451e469e73c89d0f874eacce5927e5895f27cf9b3071cd554d79f679b1eff55fb40587ebef83798d0d7c37836526c9470d7fd76f0efc755 SHA512 6497ec9432ac7e3a87e6147380d506c6f6646b3499473c5daaef59c51ae92facb333219b07fdfaca5d85dc539c2ac1344ec55bf21772470b68035e78899658b1
DIST blocky-0.26.2.tar.gz 7259209 BLAKE2B 30edff9e6746dd21128f7bb486bd8d8eac19da42aed237aa4917c1d806ff28b2ce6e0567dfc9096279cf7955ff483c994dd54995bf9720144381a058fea84cec SHA512 fbda89fc7baf940abd1aa33f385b78a9603329172a3b610b68b1b7c620c0382e417afb3003a2828df267476cefe49ac68661192307bb9faea85cc2998459d1ca

View File

@@ -0,0 +1,105 @@
# Copyright 1999-2025 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=e2ada40b478f97946ef84588cafd1822b7c37c2e
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
default
fi
}
src_compile() {
[[ ${PV} != 9999* ]] && { export VERSION="${PV}" && ln -sv ../vendor ./ || die ; }
# 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
}

View File

@@ -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=d58f16a83c51f47ed033a8447527fd6e7b9af135
DOCUMENTATION_COMMIT=e2ada40b478f97946ef84588cafd1822b7c37c2e
if [[ ${PV} == 9999* ]]; then
inherit git-r3