Include symbols

This commit is contained in:
Daniel 2022-08-01 19:07:20 -04:00
parent 1d33491f5a
commit c6bd843c3c
7 changed files with 104 additions and 0 deletions

29
dns/blocky/Makefile Normal file
View file

@ -0,0 +1,29 @@
PORTNAME= blocky
DISTVERSIONPREFIX= v
DISTVERSION= 0.19
PORTREVISION= 2
CATEGORIES= dns
MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod
DISTFILES= go.mod:gomod
MAINTAINER= eduardo@FreeBSD.org
COMMENT= Fast and lightweight DNS proxy as ad-blocker
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
GO_BUILDFLAGS= -ldflags="-w -s -X github.com/0xERR0R/blocky/util.Version=${DISTVERSION} -X github.com/0xERR0R/blocky/util.BuildTime=`date '+%Y%m%d-%H%M%S'`"
USE_GITHUB= yes
GH_ACCOUNT= 0xERR0R
USE_RC_SUBR= blocky
GO_MODULE= github.com/${GH_ACCOUNT}/${GH_PROJECT}
GO_TARGET= main.go:${PREFIX}/sbin/${PORTNAME}
SUB_FILES= pkg-message
post-install:
${INSTALL_DATA} ${FILESDIR}/blocky-config.yml.sample ${STAGEDIR}${PREFIX}/etc/blocky-config.yml.sample
.include <bsd.port.mk>

5
dns/blocky/distinfo Normal file
View file

@ -0,0 +1,5 @@
TIMESTAMP = 1656269680
SHA256 (go/dns_blocky/0xERR0R-blocky-v0.19_GH0/go.mod) = bd70747ac56e33d01329866b2373a5eaf1615796333a252bdf00fedbf7c768fa
SIZE (go/dns_blocky/0xERR0R-blocky-v0.19_GH0/go.mod) = 3864
SHA256 (go/dns_blocky/0xERR0R-blocky-v0.19_GH0/0xERR0R-blocky-v0.19_GH0.tar.gz) = 25aa341a836ded4f2c60eb7e3a578d8723148c327c297fdc572c342f8fc79c41
SIZE (go/dns_blocky/0xERR0R-blocky-v0.19_GH0/0xERR0R-blocky-v0.19_GH0.tar.gz) = 662597

View file

@ -0,0 +1,14 @@
upstream:
default:
- 1.1.1.1
- tcp-tls:fdns1.dismail.de:853
- https://dns.digitale-gesellschaft.ch/dns-query
blocking:
blackLists:
ads:
- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
clientGroupsBlock:
default:
- ads
port: 53
httpPort: 4000

View file

@ -0,0 +1,36 @@
#!/bin/sh
# PROVIDE: blocky
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown
#
# Add the following to /etc/rc.conf[.local] to enable this service
#
# blocky_enable (bool): Set to NO by default.
# Set it to YES to enable blocky.
# blocky_config (str): Set to /usr/local/etc/blocky/config.yml by default.
#
. /etc/rc.subr
name=blocky
rcvar=blocky_enable
load_rc_config ${name}
: ${blocky_enable:=NO}
: ${blocky_config:="%%PREFIX%%/etc/blocky-config.yml"}
: ${blocky_flags:=}
pidfile=/var/run/blocky.pid
command="%%PREFIX%%/sbin/blocky"
start_cmd="${name}_start"
blocky_start()
{
echo -n "Starting ${name}."
/usr/sbin/daemon -p ${pidfile} -f ${command} -c ${blocky_config} ${blocky_flags}
}
run_rc_command "$1"

View file

@ -0,0 +1,14 @@
[
{ type: install
message: <<EOM
A sample configuration file is installed at the following location:
%%PREFIX%%/etc/blocky-config.yml.sample
Default location for configuration file when using rc.d script:
%%PREFIX%%/etc/blocky-config.yml
Please refer to the documentation located at
https://0xerr0r.github.io/blocky/ for further information.
EOM
}
]

4
dns/blocky/pkg-descr Normal file
View file

@ -0,0 +1,4 @@
Fast and lightweight DNS proxy as ad-blocker for local
network with many features.
WWW: https://0xerr0r.github.io/blocky/

2
dns/blocky/pkg-plist Normal file
View file

@ -0,0 +1,2 @@
@sample etc/blocky-config.yml.sample
sbin/blocky