From 46b83222d17ef25d67f9e52fd470b7ab6af6273a Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Sat, 11 Mar 2023 05:40:47 +0100 Subject: [PATCH] unresolved: new ptrcport --- unresolved/APKBUILD | 35 +++++++++++++++++++++++++++++++++++ unresolved/unresolved.confd | 3 +++ unresolved/unresolved.initd | 13 +++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 unresolved/APKBUILD create mode 100644 unresolved/unresolved.confd create mode 100644 unresolved/unresolved.initd diff --git a/unresolved/APKBUILD b/unresolved/APKBUILD new file mode 100644 index 0000000..c675c06 --- /dev/null +++ b/unresolved/APKBUILD @@ -0,0 +1,35 @@ +# Contributor: Patrycja Rosa +# Maintainer: Patrycja Rosa +pkgname=unresolved +pkgver=0.1.0 +pkgrel=0 +pkgdesc="Local DNS forwarder with split DNS and DoT/DoH support" +url="https://git.ptrc.gay/ptrcnull/unresolved" +arch="all" +license="BSD-2-Clause" +makedepends="cargo" +subpackages="$pkgname-openrc" +source="https://git.ptrc.gay/ptrcnull/unresolved/-/archive/$pkgver/unresolved-$pkgver.tar.gz + unresolved.initd + unresolved.confd + " +options="!check" # whoops no tests + +export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse" + +build() { + cargo build --frozen --release +} + +package() { + install -Dm755 target/release/unresolved "$pkgdir"/usr/bin/unresolved + + install -Dm755 "$srcdir"/unresolved.initd "$pkgdir"/etc/init.d/unresolved + install -Dm644 "$srcdir"/unresolved.confd "$pkgdir"/etc/conf.d/unresolved +} + +sha512sums=" +1e9c8086b9ac47a6d5eaaeb2c73703383fcafe114833d536d5a4a34b9c36bbc86a24fcf3417ea1788f0734435ee996f4a70fbc5950103658b453fc9f40a3b638 unresolved-0.1.0.tar.gz +491a20ae5fdd5eafa3f2eb26b036880790d34ce4b3d1f0855509c5183f497fc4dc4a7f10adbc2fee1761abc3920746487a053a99c30b892198cb9edf7d43ad18 unresolved.initd +77e26379361cf94744a5bf1c925162ab3c6129702ed3bf0f26d55c7dc2d91167194ff73812200313c96c5e5d554143059949d7a640848a265c817f4e79a4327f unresolved.confd +" diff --git a/unresolved/unresolved.confd b/unresolved/unresolved.confd new file mode 100644 index 0000000..2648a32 --- /dev/null +++ b/unresolved/unresolved.confd @@ -0,0 +1,3 @@ +# config for /etc/init.d/unresolved + +# command_args="--bind 0.0.0.0:5353 --cache-size 0" diff --git a/unresolved/unresolved.initd b/unresolved/unresolved.initd new file mode 100644 index 0000000..cc96960 --- /dev/null +++ b/unresolved/unresolved.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +name="unresolved" +command="/usr/bin/unresolved" + +output_log="/var/log/unresolved.log" +error_log="/var/log/unresolved.log" + +depend() { + need net + after firewall +} \ No newline at end of file