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_URL
:=https
://github.com
/hyperboria
/cjdns.git
25 PKG_SOURCE_VERSION
:=1cf53a812a9b19e5ce883c16d40ac183f61d43f6
27 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_SOURCE_VERSION
).
tar.bz2
28 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_SOURCE_VERSION
)
29 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_SOURCE_VERSION
)
31 include $(INCLUDE_DIR
)/package.mk
37 SUBMENU
:=Routing and Redirection
38 TITLE
:=Encrypted near-zero-conf mesh routing protocol
39 URL
:=https
://github.com
/hyperboria
/cjdns
40 MAINTAINER
:=Lars Gierth
<larsg@systemli.org
>
41 DEPENDS
:=@IPV6
+kmod-tun
+libnl-tiny
+libpthread
+librt \
42 +libuci-lua
+lua-bencode
+dkjson
+luasocket
+lua-sha2
45 define Package
/cjdns
/description
46 Cjdns implements an encrypted IPv6 network using public-key cryptography \
47 for address allocation and a distributed hash table for routing. \
48 This provides near-zero-configuration networking
, and prevents many \
49 of the security and scalability issues that plague existing networks.
52 define Package
/cjdns-tests
55 SUBMENU
:=Routing and Redirection
56 TITLE
:=cjdns
test cases
57 URL
:=https
://github.com
/hyperboria
/cjdns
58 MAINTAINER
:=Lars Gierth
<larsg@systemli.org
>
59 DEPENDS
:=+libpthread
+librt
62 define Package
/cjdns-test
/description
66 define Build
/Configure
71 ifneq ($(CONFIG_KERNEL_SECCOMP_FILTER
),y
)
72 PKG_DO_VARS
+= Seccomp_NO
=1
75 ifneq ($(CONFIG_USE_UCLIBC
),)
76 PKG_DO_VARS
+= UCLIBC
=1
83 RANLIB
="$(TARGET_RANLIB)" \
84 CFLAGS
="$(TARGET_CFLAGS)" \
85 LDFLAGS
="$(TARGET_LDFLAGS)" \
87 TARGET_ARCH
="$(CONFIG_ARCH)" \
88 SSP_SUPPORT
="$(CONFIG_SSP_SUPPORT)" \
89 GYP_ADDITIONAL_ARGS
="-f make-linux" \
94 define Package
/cjdns
/install
100 $(1)/etc
/uci-defaults \
101 $(1)/usr
/lib
/lua
/cjdns
104 .
/files
/cjdrouteconf \
108 $(PKG_BUILD_DIR
)/cjdroute \
112 $(PKG_BUILD_DIR
)/publictoip6 \
117 $(1)/etc
/init.d
/cjdns
120 .
/files
/cjdns.defaults \
121 $(1)/etc
/uci-defaults
/cjdns
125 $(1)/usr
/lib
/lua
/cjdns
128 define Package
/cjdns
/postinst
130 if
[ -z
$${IPKG_INSTROOT} ] ; then
131 ( .
/etc
/uci-defaults
/cjdns
) && rm -f
/etc
/uci-defaults
/cjdns
132 # TODO: we should have an 'Enable' button instead
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
))