import ports/net/doh, https://github.com/curl/doh - a simple client

(using libcurl) for testing DNS-over-HTTPS servers.  comments/ok gsoares@
This commit is contained in:
sthen 2019-09-14 23:40:40 +00:00
parent 90f32063a3
commit 4f5d00e822
5 changed files with 49 additions and 0 deletions

29
net/doh/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $OpenBSD: Makefile,v 1.1.1.1 2019/09/14 23:40:40 sthen Exp $
COMMENT= simple DoH (dns-over-https) client
GH_ACCOUNT= curl
GH_PROJECT= doh
GH_COMMIT= 541073829865a72963d80e0efbb13382a3447621
DISTNAME= doh-0.20190913
CATEGORIES= net
# MIT
PERMIT_PACKAGE= Yes
WANTLIB= c crypto curl nghttp2 ssl z
ALL_TARGET= doh
MAKE_ENV= COPTFLAGS="${CFLAGS}" CC="${CC}"
LIB_DEPENDS= net/curl
NO_TEST= Yes
USE_GMAKE= Yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/doh ${PREFIX}/bin/doh
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/doh
${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/doh/
.include <bsd.port.mk>

2
net/doh/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (doh-0.20190913-54107382.tar.gz) = m40rkd9UdfyjUvk3oi1DaDzy6SxG65GJtgeA0KR+Hq4=
SIZE (doh-0.20190913-54107382.tar.gz) = 8559

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2019/09/14 23:40:40 sthen Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,7 +1,7 @@
TARGET = doh
OBJS = doh.o
LDLIBS = `curl-config --libs`
-CFLAGS = -W -Wall -pedantic -g `curl-config --cflags`
+CFLAGS = -W -Wall -pedantic -g `curl-config --cflags` ${COPTFLAGS}
$(TARGET): $(OBJS)

2
net/doh/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
doh is a simple tool that uses libcurl to resolve a host name
using a POST request to a DNS-over-HTTPS (DoH) server.

2
net/doh/pkg/PLIST Normal file
View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/09/14 23:40:40 sthen Exp $
@bin bin/doh