From 060d90d6048ed57edec9fdb2563f3acf4c0f9279 Mon Sep 17 00:00:00 2001 From: David Yang Date: Thu, 30 Nov 2017 23:26:49 +0800 Subject: [PATCH] i2pd: Add package Signed-off-by: David Yang --- net/i2pd/Makefile | 61 ++++++++++++++++++++++++ net/i2pd/files/i2pd.init | 15 ++++++ net/i2pd/patches/010-cross-compile.patch | 11 +++++ 3 files changed, 87 insertions(+) create mode 100644 net/i2pd/Makefile create mode 100755 net/i2pd/files/i2pd.init create mode 100644 net/i2pd/patches/010-cross-compile.patch diff --git a/net/i2pd/Makefile b/net/i2pd/Makefile new file mode 100644 index 000000000..aba88e657 --- /dev/null +++ b/net/i2pd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2015, 2016 gxcreator +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=i2pd +PKG_VERSION:=2.16.0 +PKG_RELEASE:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/PurpleI2P/i2pd.git +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_MIRROR_HASH:=e9dee670dc53d258919e1fb9444fcaeab0d380c438e71cd5323f08332b937918 +PKG_LICENSE:=BSD-3-clause + +include $(INCLUDE_DIR)/package.mk + +define Package/i2pd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl +boost +boost-system +boost-filesystem +boost-regex \ + +boost-program_options +boost-date_time +libatomic +zlib + TITLE:=full-featured C++ implementation of I2P client + URL:=https://github.com/PurpleI2P/i2pd + MAINTAINER:=David Yang +endef + +define Package/i2pd/description + I2P (Invisible Internet Protocol) is a universal anonymous network layer. All + communications over I2P are anonymous and end-to-end encrypted, participants + don't reveal their real IP addresses. +endef + +define Package/i2pd/conffiles + /etc/i2pd/i2pd.conf + /etc/i2pd/subscriptions.txt + /etc/i2pd/tunnels.conf +endef + +MAKE_FLAGS+=USE_AESNI=no USE_AVX=no + +define Package/i2pd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc/i2pd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd +endef + +$(eval $(call BuildPackage,i2pd)) diff --git a/net/i2pd/files/i2pd.init b/net/i2pd/files/i2pd.init new file mode 100755 index 000000000..36a19906f --- /dev/null +++ b/net/i2pd/files/i2pd.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2017 OpenWrt.org + +START=70 +STOP=70 + +USE_PROCD=1 +PROG=/usr/sbin/i2pd + + +start_service() { + procd_open_instance + procd_set_param command $PROG --conf=/etc/i2pd/i2pd.conf + procd_close_instance +} diff --git a/net/i2pd/patches/010-cross-compile.patch b/net/i2pd/patches/010-cross-compile.patch new file mode 100644 index 000000000..614de4ad2 --- /dev/null +++ b/net/i2pd/patches/010-cross-compile.patch @@ -0,0 +1,11 @@ +--- a/Makefile.linux 2017-11-14 03:20:41.000000000 +0800 ++++ b/Makefile.linux 2017-11-29 23:55:38.919136211 +0800 +@@ -44,7 +44,7 @@ + LDLIBS += -lpthread -static-libstdc++ -static-libgcc -lrt -ldl + USE_AESNI := no + else +- LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread ++ LDLIBS = -latomic -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread + endif + + # UPNP Support (miniupnpc 1.5 and higher)