2 # Copyright (C) 2016 OpenWrt.org
3 # Copyright (C) 2012-2016 Black Roland and contributors (https://github.com/black-roland/exOpenWrt/graphs/contributors)
4 # Copyright (C) 2011-2012 Entware
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
10 include $(TOPDIR
)/rules.mk
12 PKG_NAME
:=dnscrypt-proxy
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=http
://download.dnscrypt.org
/dnscrypt-proxy \
18 https
://github.com
/jedisct1
/dnscrypt-proxy
/releases
/download
/$(PKG_VERSION
)
19 PKG_HASH
:=e89f5b9039979ab392302faf369ef7593155d5ea21580402a75bbc46329d1bb6
23 PKG_MAINTAINER
:=Damiano Renfer
<damiano.renfer@gmail.com
>
25 PKG_CONFIG_DEPENDS
:= \
26 CONFIG_DNSCRYPT_ENABLE_PLUGINS
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/dnscrypt-proxy
/Default
33 SUBMENU
:=IP Addresses and Names
34 URL
:=http
://dnscrypt.org
/
35 MAINTAINER
:=Damiano Renfer
<damiano.renfer@gmail.com
>
38 define Package
/dnscrypt-proxy
39 $(call Package
/dnscrypt-proxy
/Default
)
40 DEPENDS
:=+libsodium
+dnscrypt-proxy-resolvers
+DNSCRYPT_ENABLE_PLUGINS
:libltdl \
41 +DNSCRYPT_ENABLE_PLUGINS
:libldns
42 TITLE
:=A tool for securing communications between a client and a DNS resolver
45 define Package
/dnscrypt-proxy
/description
46 dnscrypt-proxy provides local service which can be used directly
as your
47 local resolver or
as a DNS forwarder
, encrypting and authenticating requests
48 using the DNSCrypt protocol and passing them to an upstream server.
49 The DNSCrypt protocol uses high-speed high-security elliptic-curve cryptography
50 and is very similar to DNSCurve
, but focuses on securing communications between
51 a client and its first-level resolver.
54 define Package
/dnscrypt-proxy-resolvers
55 $(call Package
/dnscrypt-proxy
/Default
)
56 TITLE
:=Package with current list of dnscrypt-proxy resolvers
57 VERSION
:=$(PKG_VERSION
)+git-20161129-f17bace-
$(PKG_RELEASE
)
60 define Package
/dnscrypt-proxy-resolvers
/description
61 Package with current list of dnscrypt-proxy resolvers.
65 $(call Package
/dnscrypt-proxy
/Default
)
67 TITLE
:=Resolver to IPv4 or IPv6 addresses
70 define Package
/hostip
/description
71 The DNSCrypt proxy ships with a simple tool named hostip that resolves a name
72 to IPv4 or IPv6 addresses.
75 define Package
/dnscrypt-proxy
/config
76 source
"$(SOURCE)/Config.in"
79 define Build
/Configure
80 $(call Build
/Configure
/Default
, \
83 $(if
$(CONFIG_DNSCRYPT_ENABLE_PLUGINS
),,--disable-plugins
) \
88 -fomit-frame-pointer \
96 CFLAGS
="$(TARGET_CFLAGS)" \
97 LDFLAGS
="$(TARGET_LDFLAGS)"
99 define Package
/dnscrypt-proxy
/install
100 $(INSTALL_DIR
) $(1)/usr
/sbin
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dnscrypt-proxy
$(1)/usr
/sbin
/
102 $(INSTALL_DIR
) $(1)/etc
/init.d
103 $(INSTALL_BIN
) .
/files
/dnscrypt-proxy.init
$(1)/etc
/init.d
/dnscrypt-proxy
104 $(INSTALL_DIR
) $(1)/etc
/config
105 $(INSTALL_CONF
) .
/files
/dnscrypt-proxy.config
$(1)/etc
/config
/dnscrypt-proxy
106 $(if
$(CONFIG_DNSCRYPT_ENABLE_PLUGINS
), \
107 $(INSTALL_DIR
) $(1)/usr
/lib
/dnscrypt-proxy
; \
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dnscrypt-proxy
/libdcplugin_example_cache.so
$(1)/usr
/lib
/dnscrypt-proxy
/; \
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dnscrypt-proxy
/libdcplugin_example_ldns_aaaa_blocking.so
$(1)/usr
/lib
/dnscrypt-proxy
/; \
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dnscrypt-proxy
/libdcplugin_example_ldns_blocking.so
$(1)/usr
/lib
/dnscrypt-proxy
/; \
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dnscrypt-proxy
/libdcplugin_example_logging.so
$(1)/usr
/lib
/dnscrypt-proxy
/)
114 define Package
/dnscrypt-proxy-resolvers
/install
115 $(INSTALL_DIR
) $(1)/usr
/share
/dnscrypt-proxy
116 $(CP
) .
/files
/dnscrypt-resolvers.csv
$(1)/usr
/share
/dnscrypt-proxy
/
119 define Package
/dnscrypt-proxy
/conffiles
120 /etc
/config
/dnscrypt-proxy
123 define Package
/hostip
/install
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/hostip
$(1)/usr
/bin
/
128 $(eval
$(call BuildPackage
,dnscrypt-proxy
))
129 $(eval
$(call BuildPackage
,dnscrypt-proxy-resolvers
))
130 $(eval
$(call BuildPackage
,hostip
))