1 # This is free software, licensed under the GNU General Public License v2.
2 # See /LICENSE for more information.
5 include $(TOPDIR
)/rules.mk
11 PKG_LICENSE
:=BSD-3-Clause
12 PKG_LICENSE_FILES
:=LICENSE
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://getdnsapi.net
/dist/
17 PKG_HASH
:=f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c
21 PKG_CONFIG_DEPENDS
:= \
22 CONFIG_GETDNS_BUILD_LIBEVENT2 \
23 CONFIG_GETDNS_ENABLE_STUB_ONLY \
24 CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/cmake.mk
29 define Package
/getdns
/Default
31 URL
:=https
://getdnsapi.net
/
35 $(call Package
/getdns
/Default
)
39 DEPENDS
+= +libopenssl
+GETDNS_BUILD_LIBEVENT2
:libevent2
+!GETDNS_ENABLE_STUB_ONLY
:libunbound
+GETDNS_ENABLE_IDN_LIBIDN2
:libidn2
43 define Package
/getdns
/description
44 This package contains the getdns library
(libgetdns
).
45 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
).
48 define Package
/getdns
/config
49 source
"$(SOURCE)/Config.in"
52 # CMAKE options for GetDNS are described in this document:
53 # https://getdnsapi.net/quick-start/cmake-quick-start/
54 CMAKE_OPTIONS
+= -DBUILD_LIBEV
=OFF
55 CMAKE_OPTIONS
+= -DBUILD_LIBUV
=OFF
57 CMAKE_OPTIONS
+= -DBUILD_LIBEVENT2
=$(if
$(CONFIG_GETDNS_BUILD_LIBEVENT2
),ON
,OFF
)
58 CMAKE_OPTIONS
+= -DENABLE_STUB_ONLY
=$(if
$(CONFIG_GETDNS_ENABLE_STUB_ONLY
),ON
,OFF
)
59 CMAKE_OPTIONS
+= -DUSE_LIBIDN2
=$(if
$(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
),ON
,OFF
)
61 # getdns will use libbsd for the functions inet_pton, inet_ntop, strlcpy if
62 # present, otherwise it will use builtin code for these functions. In order to
63 # force the use of the built in code and remove the libbsd dependency disable
64 # the test for libbsd.
65 CMAKE_OPTIONS
+= -DBSD_LIBRARY
=OFF
67 # Disable static linking to ensure that utility programs such as getdns_query
68 # don't end up as large statically linked binaries.
69 CMAKE_OPTIONS
+= -DENABLE_STATIC
=OFF
70 CMAKE_OPTIONS
+= -DENABLE_SHARED
=ON
# This is the default
72 define Package
/getdns
/install
73 $(INSTALL_DIR
) $(1)/usr
/lib
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgetdns.so.
* $(1)/usr
/lib
/
75 $(INSTALL_DIR
) $(1)/usr
/sbin
76 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/getdns_query
$(1)/usr
/sbin
/getdns_query
79 $(eval
$(call BuildPackage
,getdns
))