mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
net-proxy/dnss: fix pkgcheck warnings, drop init service files
- Remove unknown openrc USE flag and unused RDEPEND/DEPEND. - Drop conditional install of systemd and openrc service files. - Reorder SRC_URI before IUSE, add final newline. - Keep example config install (when present). Signed-off-by: Theron York <theron.york@cloudnuke.org>
This commit is contained in:
@@ -4,23 +4,16 @@
|
||||
EAPI=8
|
||||
ZIG_SLOT="0.16"
|
||||
|
||||
inherit zig systemd
|
||||
inherit zig
|
||||
|
||||
DESCRIPTION="A small, speedy DNS proxy and bad-stuff-blocker"
|
||||
HOMEPAGE="https://codeberg.org/zacoons/dnss"
|
||||
SRC_URI="https://codeberg.org/zacoons/dnss/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Unlicense"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="openrc systemd"
|
||||
|
||||
RDEPEND="
|
||||
openrc? ( sys-apps/openrc )
|
||||
systemd? ( sys-apps/systemd )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
SRC_URI="https://codeberg.org/zacoons/dnss/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/dnss"
|
||||
|
||||
src_compile() {
|
||||
@@ -31,25 +24,10 @@ src_install() {
|
||||
zig_src_install
|
||||
|
||||
# Example config
|
||||
if [[ ! -f "${S}/example.dnss.conf" ]]; then
|
||||
die "example.dnss.conf not found"
|
||||
fi
|
||||
insinto /etc
|
||||
newins "${S}/example.dnss.conf" dnss.conf.example
|
||||
|
||||
# systemd service
|
||||
if use systemd; then
|
||||
if [[ ! -f "${S}/pkg/aur/systemd/dnss.service" ]]; then
|
||||
die "systemd service file not found at pkg/aur/systemd/dnss.service"
|
||||
fi
|
||||
systemd_dounit "${S}/pkg/aur/systemd/dnss.service"
|
||||
fi
|
||||
|
||||
# OpenRC init script
|
||||
if use openrc; then
|
||||
if [[ ! -f "${S}/pkg/aur/openrc/dnss.service" ]]; then
|
||||
die "OpenRC script not found at pkg/aur/openrc/dnss"
|
||||
fi
|
||||
newinitd "${S}/pkg/aur/openrc/dnss" dnss
|
||||
if [[ -f "${S}/example.dnss.conf" ]]; then
|
||||
insinto /etc
|
||||
newins "${S}/example.dnss.conf" dnss.conf.example
|
||||
else
|
||||
ewarn "example.dnss.conf not found; skipping config example"
|
||||
fi
|
||||
}
|
||||
@@ -4,55 +4,28 @@
|
||||
EAPI=8
|
||||
ZIG_SLOT="0.16"
|
||||
|
||||
inherit zig systemd git-r3
|
||||
inherit zig git-r3
|
||||
|
||||
DESCRIPTION="A small, speedy DNS proxy and bad-stuff-blocker"
|
||||
HOMEPAGE="https://codeberg.org/zacoons/dnss"
|
||||
EGIT_REPO_URI="https://codeberg.org/zacoons/dnss.git"
|
||||
|
||||
LICENSE="Unlicense"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
|
||||
IUSE="openrc systemd"
|
||||
|
||||
RDEPEND="
|
||||
openrc? ( sys-apps/openrc )
|
||||
systemd? ( sys-apps/systemd )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
EGIT_REPO_URI="https://codeberg.org/zacoons/dnss.git"
|
||||
|
||||
src_compile() {
|
||||
ezig build --release=fast
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Manually install the binary because zig_src_install may fail
|
||||
local binary="${BUILD_DIR}/zig-out/bin/dnss"
|
||||
[[ -f "${binary}" ]] || binary="${S}/zig-out/bin/dnss"
|
||||
[[ -f "${binary}" ]] || die "dnss binary not found"
|
||||
dobin "${binary}"
|
||||
zig_src_install
|
||||
|
||||
# Example config
|
||||
if [[ ! -f "${S}/example.dnss.conf" ]]; then
|
||||
die "example.dnss.conf not found"
|
||||
fi
|
||||
insinto /etc
|
||||
newins "${S}/example.dnss.conf" dnss.conf.example
|
||||
|
||||
# systemd service
|
||||
if use systemd; then
|
||||
if [[ ! -f "${S}/pkg/aur/systemd/dnss.service" ]]; then
|
||||
die "systemd service file not found at pkg/aur/systemd/dnss.service"
|
||||
fi
|
||||
systemd_dounit "${S}/pkg/aur/systemd/dnss.service"
|
||||
fi
|
||||
|
||||
# OpenRC init script
|
||||
if use openrc; then
|
||||
if [[ ! -f "${S}/pkg/aur/openrc/dnss" ]]; then
|
||||
die "OpenRC script not found at pkg/aur/openrc/dnss"
|
||||
fi
|
||||
newinitd "${S}/pkg/aur/openrc/dnss" dnss
|
||||
if [[ -f "${S}/example.dnss.conf" ]]; then
|
||||
insinto /etc
|
||||
newins "${S}/example.dnss.conf" dnss.conf.example
|
||||
else
|
||||
ewarn "example.dnss.conf not found; skipping config example"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user