1 include $(TOPDIR)/rules.mk
7 PKG_SOURCE_URL:=https://github.com/cjdelisle/cjdns.git
9 PKG_SOURCE_VERSION:=2138a1f6a94fc009958cde7b002c077a1eee929a
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
12 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
13 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
15 include $(INCLUDE_DIR)/package.mk
21 SUBMENU:=Routing and Redirection
22 TITLE:=Encrypted near-zero-conf mesh routing protocol
23 URL:=https://github.com/hyperboria/cjdns
24 MAINTAINER:=Lars Gierth <larsg@systemli.org>
25 DEPENDS:=+kmod-tun +kmod-ipv6 +libnl-tiny +libpthread +librt \
26 +libuci-lua +lua-bencode +dkjson +luasocket +lua-sha2
29 define Package/cjdns/description
30 Cjdns implements an encrypted IPv6 network using public-key cryptography \
31 for address allocation and a distributed hash table for routing. \
32 This provides near-zero-configuration networking, and prevents many \
33 of the security and scalability issues that plague existing networks.
36 define Build/Configure
39 ifneq ($(CONFIG_KERNEL_SECCOMP_FILTER),y)
40 PKG_DO_VARS:=Seccomp_NO=1
46 CFLAGS="$(TARGET_CFLAGS)" \
47 LDFLAGS="$(TARGET_LDFLAGS)" \
49 TARGET_ARCH="$(CONFIG_ARCH)" \
51 SSP_SUPPORT="$(CONFIG_SSP_SUPPORT)" \
56 define Package/cjdns/install
62 $(1)/etc/uci-defaults \
63 $(1)/usr/lib/lua/cjdns
66 ./files/cjdrouteconf \
70 $(PKG_BUILD_DIR)/cjdroute \
74 $(PKG_BUILD_DIR)/publictoip6 \
82 ./files/cjdns.defaults \
83 $(1)/etc/uci-defaults/cjdns
87 $(1)/usr/lib/lua/cjdns
90 define Package/cjdns/postinst
92 if [ -z $${IPKG_INSTROOT} ] ; then
93 ( . /etc/uci-defaults/cjdns ) && rm -f /etc/uci-defaults/cjdns
94 # TODO: we should have an 'Enable' button instead
95 /etc/init.d/cjdns enabled || /etc/init.d/cjdns enable
100 $(eval $(call BuildPackage,cjdns))