2018-01-14 13:55:59 +00: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 04:29:00 +00:00
PKG_VERSION := 1.7.3
2023-02-21 14:54:16 +00:00
PKG_RELEASE := 2
2018-01-14 13:55:59 +00:00
PKG_LICENSE := BSD-3-Clause
PKG_LICENSE_FILES := LICENSE
2021-06-13 14:10:40 +00:00
PKG_MAINTAINER :=
2018-01-14 13:55:59 +00:00
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE_URL := https://getdnsapi.net/dist/
2023-01-07 04:29:00 +00:00
PKG_HASH := f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c
2018-01-14 13:55:59 +00:00
2020-07-01 20:09:34 +00:00
CMAKE_INSTALL := 1
2018-01-14 13:55:59 +00:00
PKG_CONFIG_DEPENDS := \
2020-11-09 21:32:50 +00:00
CONFIG_GETDNS_BUILD_LIBEVENT2 \
2018-01-14 13:55:59 +00:00
CONFIG_GETDNS_ENABLE_STUB_ONLY \
2019-01-03 01:16:23 +00:00
CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
2018-01-14 13:55:59 +00:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
2021-06-10 23:27:06 +00:00
i n c l u d e $( INCLUDE_DIR ) / c m a k e . m k
2018-01-14 13:55:59 +00: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-09 21:32:50 +00:00
DEPENDS += +libopenssl +GETDNS_BUILD_LIBEVENT2:libevent2 +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN_LIBIDN2:libidn2
2018-01-14 13:55:59 +00: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
2019-01-03 01:16:23 +00:00
This package contains the getdns library ( libgetdns) .
2018-01-14 13:55:59 +00: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-01 20:09:34 +00: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
2018-09-10 03:59:23 +00:00
2020-11-09 21:32:50 +00:00
CMAKE_OPTIONS += -DBUILD_LIBEVENT2= $( if $( CONFIG_GETDNS_BUILD_LIBEVENT2) ,ON,OFF)
2020-07-01 20:09:34 +00: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)
2019-01-03 01:16:23 +00:00
2020-07-01 20:09:34 +00:00
# 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.
2020-07-07 21:20:01 +00:00
CMAKE_OPTIONS += -DBSD_LIBRARY= OFF
2019-01-03 01:16:23 +00:00
2021-02-07 13:40:36 +00:00
# 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-01-14 13:55:59 +00: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
2019-06-06 16:57:52 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libgetdns.so.* $( 1) /usr/lib/
2019-01-03 01:16:23 +00:00
$( INSTALL_DIR) $( 1) /usr/sbin
2018-01-14 13:55:59 +00:00
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/getdns_query $( 1) /usr/sbin/getdns_query
e n d e f
$( eval $ ( call BuildPackage ,getdns ) )