2 # Copyright (C) 2014,2015 Hyperboria.net
4 # You may redistribute this program and/or modify it under the terms of
5 # the GNU General Public License as published by the Free Software Foundation,
6 # either version 3 of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 include $(TOPDIR
)/rules.mk
23 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
24 PKG_SOURCE_URL
:=https
://codeload.github.com
/cjdelisle
/cjdns
/tar.gz
/$(PKG_NAME
)-$(PKG_VERSION
)?
25 PKG_HASH
:=a6158ce7847159aa44e86f74ccc7b6ded6910a230ed8f3830db53cda5838f0b0
26 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_NAME
)-$(PKG_VERSION
)
28 PKG_MAINTAINER
:=William Fleurant
<meshnet@protonmail.com
>
29 PKG_LICENSE
:=GPL-3.0
-or-later
30 PKG_LICENSE_FILES
:=LICENSE
32 include $(INCLUDE_DIR
)/package.mk
37 SUBMENU
:=Routing and Redirection
38 TITLE
:=Encrypted near-zero-conf mesh routing protocol
39 URL
:=https
://github.com
/cjdelisle
/cjdns
40 DEPENDS
:=@
!arc @IPV6
+kmod-tun
+libnl-tiny
+libpthread
+librt \
41 +libuci-lua
+lua-bencode
+dkjson
+luasocket
+lua-sha2
44 define Package
/cjdns
/description
45 Cjdns implements an encrypted IPv6 network using public-key cryptography \
46 for address allocation and a distributed hash table for routing. \
47 This provides near-zero-configuration networking
, and prevents many \
48 of the security and scalability issues that plague existing networks.
51 define Package
/cjdns-tests
54 SUBMENU
:=Routing and Redirection
55 TITLE
:=cjdns
test cases
56 URL
:=https
://github.com
/cjdelisle
/cjdns
57 DEPENDS
:=+libpthread
+librt @
!arc
60 define Package
/cjdns-test
/description
61 Builds cjdns
test cases binary test_testcjdroute_c
64 define Build
/Configure
67 PKG_DO_VARS
:=CJDNS_RELEASE_VERSION
=$(PKG_SOURCE_VERSION
)
69 ifneq ($(CONFIG_KERNEL_SECCOMP_FILTER
),y
)
70 PKG_DO_VARS
+= Seccomp_NO
=1
73 ifneq ($(CONFIG_USE_UCLIBC
),)
74 PKG_DO_VARS
+= UCLIBC
=1
78 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/tmp
79 (cd
$(PKG_BUILD_DIR
) && \
83 RANLIB
="$(TARGET_RANLIB)" \
84 CFLAGS
="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -Wno-error=array-bounds -Wno-error=stringop-overflow -Wno-error=stringop-overread" \
85 LDFLAGS
="$(TARGET_LDFLAGS)" \
87 TARGET_ARCH
="$(CONFIG_ARCH)" \
88 SSP_SUPPORT
="$(CONFIG_SSP_SUPPORT)" \
89 GYP_ADDITIONAL_ARGS
="-f make-linux" \
90 CJDNS_BUILD_TMPDIR
="$(PKG_BUILD_DIR)/tmp" \
95 define Package
/cjdns
/install
101 $(1)/etc
/uci-defaults \
102 $(1)/usr
/lib
/lua
/cjdns
105 .
/files
/cjdrouteconf \
109 $(PKG_BUILD_DIR
)/cjdroute \
113 $(PKG_BUILD_DIR
)/publictoip6 \
118 $(1)/etc
/init.d
/cjdns
121 .
/files
/cjdns.defaults \
122 $(1)/etc
/uci-defaults
/cjdns
126 $(1)/usr
/lib
/lua
/cjdns
129 define Package
/cjdns
/postinst
131 if
[ -z
$${IPKG_INSTROOT} ] ; then
132 ( .
/etc
/uci-defaults
/cjdns
) && rm -f
/etc
/uci-defaults
/cjdns
133 /etc
/init.d
/cjdns enabled ||
/etc
/init.d
/cjdns enable
138 define Package
/cjdns-tests
/install
139 $(INSTALL_DIR
) $(1)/usr
/bin
141 $(PKG_BUILD_DIR
)/build_linux
/test_testcjdroute_c \
145 $(eval
$(call BuildPackage
,cjdns
))
146 $(eval
$(call BuildPackage
,cjdns-tests
))