2018-10-18 16:56:47 +08:00
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := getdns
2023-01-07 12:29:00 +08:00
PKG_VERSION := 1.7.3
PKG_RELEASE := 1
2018-10-18 16:56:47 +08:00
PKG_LICENSE := BSD-3-Clause
PKG_LICENSE_FILES := LICENSE
2021-06-15 17:47:11 +08:00
PKG_MAINTAINER :=
2018-10-18 16:56:47 +08:00
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE_URL := https://getdnsapi.net/dist/
2023-01-07 12:29:00 +08:00
PKG_HASH := f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c
2018-10-18 16:56:47 +08:00
2020-07-08 14:18:52 +08:00
CMAKE_INSTALL := 1
2018-10-18 16:56:47 +08:00
PKG_CONFIG_DEPENDS := \
2020-11-10 05:32:50 +08:00
CONFIG_GETDNS_BUILD_LIBEVENT2 \
2018-10-18 16:56:47 +08:00
CONFIG_GETDNS_ENABLE_STUB_ONLY \
2020-07-08 14:18:52 +08:00
CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
2018-10-18 16:56:47 +08:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
2020-07-08 14:18:52 +08:00
i n c l u d e $( INCLUDE_DIR ) / c m a k e . m k
2018-10-18 16:56:47 +08:00
d e f i n e P a c k a g e / g e t d n s / D e f a u l t
TITLE:= getdns
URL:= https://getdnsapi.net/
e n d e f
d e f i n e P a c k a g e / g e t d n s
$( call Package/getdns/Default)
SECTION:= libs
CATEGORY:= Libraries
TITLE += ( library)
2020-11-10 05:32:50 +08:00
DEPENDS += +libopenssl +GETDNS_BUILD_LIBEVENT2:libevent2 +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN_LIBIDN2:libidn2
2018-10-18 16:56:47 +08:00
MENU:= 1
e n d e f
d e f i n e P a c k a g e / g e t d n s / d e s c r i p t i o n
2020-07-08 14:18:52 +08:00
This package contains the getdns library ( libgetdns) .
2018-10-18 16:56:47 +08:00
This package also contains the "getdns_query" command line wrapper for getdns exposing the features of this implementation ( both in the official API and the additional API functions) .
e n d e f
d e f i n e P a c k a g e / g e t d n s / c o n f i g
source " $( SOURCE) /Config.in "
e n d e f
2020-07-08 14:18:52 +08:00
# CMAKE options for GetDNS are described in this document:
# https://getdnsapi.net/quick-start/cmake-quick-start/
CMAKE_OPTIONS += -DBUILD_LIBEV= OFF
CMAKE_OPTIONS += -DBUILD_LIBUV= OFF
2020-11-10 05:32:50 +08:00
CMAKE_OPTIONS += -DBUILD_LIBEVENT2= $( if $( CONFIG_GETDNS_BUILD_LIBEVENT2) ,ON,OFF)
2020-07-08 14:18:52 +08:00
CMAKE_OPTIONS += -DENABLE_STUB_ONLY= $( if $( CONFIG_GETDNS_ENABLE_STUB_ONLY) ,ON,OFF)
CMAKE_OPTIONS += -DUSE_LIBIDN2= $( if $( CONFIG_GETDNS_ENABLE_IDN_LIBIDN2) ,ON,OFF)
# getdns will use libbsd for the functions inet_pton, inet_ntop, strlcpy if
# present, otherwise it will use builtin code for these functions. In order to
# force the use of the built in code and remove the libbsd dependency disable
# the test for libbsd.
2021-06-15 17:47:11 +08:00
CMAKE_OPTIONS += -DBSD_LIBRARY= OFF
# Disable static linking to ensure that utility programs such as getdns_query
# don't end up as large statically linked binaries.
CMAKE_OPTIONS += -DENABLE_STATIC= OFF
CMAKE_OPTIONS += -DENABLE_SHARED= ON # This is the default
2018-10-18 16:56:47 +08:00
d e f i n e P a c k a g e / g e t d n s / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib
2020-07-08 14:18:52 +08:00
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libgetdns.so.* $( 1) /usr/lib/
$( INSTALL_DIR) $( 1) /usr/sbin
2018-10-18 16:56:47 +08:00
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/getdns_query $( 1) /usr/sbin/getdns_query
e n d e f
$( eval $ ( call BuildPackage ,getdns ) )