dnslookup: add new package

This commit is contained in:
Tianling Shen 2022-05-25 14:19:44 +00:00 committed by Beginner-Go
parent de69fbdbc4
commit 44ec2bc5bf
2 changed files with 47 additions and 0 deletions

44
net/dnslookup/Makefile Normal file
View File

@ -0,0 +1,44 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=dnslookup
PKG_VERSION:=1.6.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ameshkov/dnslookup/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=c877a6a65f31dfb84db251491dfbeb88e7afb0fe865316d9ec8389764b89299a
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/ameshkov/dnslookup
GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/dnslookup
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
TITLE:=Simple command line utility to make DNS lookups to the specified server
URL:=https://github.com/ameshkov/dnslookup
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef
define Package/dnslookup/description
Simple command line utility to make DNS lookups.
Supports all known DNS protocols: plain DNS, DoH, DoT, DoQ, DNSCrypt.
endef
$(eval $(call GoBinPackage,dnslookup))
$(eval $(call BuildPackage,dnslookup))

3
net/dnslookup/test.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
dnslookup --version | grep "$PKG_VERSION"