aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahil Bhimjiani <me@rahil.rocks>2024-06-15 11:48:35 +0530
committerRahil Bhimjiani <me@rahil.rocks>2024-06-15 11:50:31 +0530
commit4feaeefdb5c32f7544405027228cf511d9be94ad (patch)
treeb96d00abdd00e00806a2b15061bb2fdd6954c29f /net-dns
parent*/*: switch remaining metadata.xml to https (diff)
downloadguru-4feaeefdb5c32f7544405027228cf511d9be94ad.tar.gz
guru-4feaeefdb5c32f7544405027228cf511d9be94ad.tar.bz2
guru-4feaeefdb5c32f7544405027228cf511d9be94ad.zip
net-dns/blocky: update to 0.24
* significantly reduce deps tarball size 183 MiB -> 5.7 MiB by using `go mod vendor` Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/blocky/Manifest3
-rw-r--r--net-dns/blocky/blocky-0.24.ebuild104
-rw-r--r--net-dns/blocky/blocky-9999.ebuild6
3 files changed, 110 insertions, 3 deletions
diff --git a/net-dns/blocky/Manifest b/net-dns/blocky/Manifest
index 6b49aa54e..4cc0315b3 100644
--- a/net-dns/blocky/Manifest
+++ b/net-dns/blocky/Manifest
@@ -4,3 +4,6 @@ DIST blocky-0.22.tar.gz 712644 BLAKE2B d74881026421337a0fc32a6af2cf6bff736e0130a
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
+DIST blocky-0.24-deps.tar.xz 5931984 BLAKE2B 834f637649051cd84950bfa2cf80e2e41972e746900dc86a5ca933a17eb4e15d75ab3813e3ddc02ec53945b1114a4ac2624535ca80210df479e254e1483122c0 SHA512 ac5b371a037429b5e51ced17434ac168895cb33e41f876ba286a3fd4d0ec779f68355603c0eeaa6f09c55eb552922257f8d27c409e661b5f9ebbe240c7a6ea57
+DIST blocky-0.24-docs.tar.gz 7335085 BLAKE2B 094686354b65b8b95391c5381790c6ee6198475155dc80099d3adcb7e3ee6598d0ec4a191a15d1c3a745d9ac6e4290bc048747ef551c9d07c5cf740dee3a922b SHA512 c4151e1903945d9396c341927178e6cd4e0a82be5899f610be1746a14e1c3b4c315850cc2f6e00ec248e3a8ba2428e2f8ec0e7ddcaf936af177cb064c4edbaf4
+DIST blocky-0.24.tar.gz 7246810 BLAKE2B ec6ddbdab6f77f039e5b79e4092239ae17b003659e02bcf4d81a6371be5e5f3c9f5cc071b3a2b8ad6d0a5cc11834da5ef618445288ba1f3ae8306f8629931cbf SHA512 d89e417157a2f45232f264eed597849bf38e4ad7407d215e5ebe9b2bd84e2b31f1c434b9df915c295272214a3398fb73302814503bca5ca41b748363ecc656e6
diff --git a/net-dns/blocky/blocky-0.24.ebuild b/net-dns/blocky/blocky-0.24.ebuild
new file mode 100644
index 000000000..804021e66
--- /dev/null
+++ b/net-dns/blocky/blocky-0.24.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=8c38c181ca6600328847f3c9856df99b0c3ad04b
+
+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
+}
diff --git a/net-dns/blocky/blocky-9999.ebuild b/net-dns/blocky/blocky-9999.ebuild
index 0852ebf83..804021e66 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=e9d4e51690f700d20b2cd478eef5987653bd4cc0
+DOCUMENTATION_COMMIT=8c38c181ca6600328847f3c9856df99b0c3ad04b
if [[ ${PV} == 9999* ]]; then
inherit git-r3
@@ -54,12 +54,12 @@ src_unpack() {
git-r3_src_unpack
fi
else
- go-module_src_unpack
+ default
fi
}
src_compile() {
- [[ ${PV} != 9999* ]] && export VERSION="${PV}"
+ [[ ${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