From 2304a2bc2e5acfa7929e0b8edb32661231163fbb Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 29 Apr 2022 12:48:13 +0300 Subject: [PATCH] remove android contrib files (moved to android repo) Signed-off-by: R4SAS --- contrib/android_binary_only/.gitignore | 18 ----- contrib/android_binary_only/jni/Android.mk | 74 ------------------- .../android_binary_only/jni/Application.mk | 40 ---------- contrib/android_binary_pack/.gitignore | 2 - contrib/android_binary_pack/build-archive | 48 ------------ contrib/android_binary_pack/i2pd | 33 --------- 6 files changed, 215 deletions(-) delete mode 100644 contrib/android_binary_only/.gitignore delete mode 100644 contrib/android_binary_only/jni/Android.mk delete mode 100644 contrib/android_binary_only/jni/Application.mk delete mode 100644 contrib/android_binary_pack/.gitignore delete mode 100755 contrib/android_binary_pack/build-archive delete mode 100755 contrib/android_binary_pack/i2pd diff --git a/contrib/android_binary_only/.gitignore b/contrib/android_binary_only/.gitignore deleted file mode 100644 index 6e42311a..00000000 --- a/contrib/android_binary_only/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -gen -tests -bin -libs -log* -obj -.gradle -.idea -.externalNativeBuild -ant.properties -local.properties -build.sh -android.iml -build -gradle -gradlew -gradlew.bat - diff --git a/contrib/android_binary_only/jni/Android.mk b/contrib/android_binary_only/jni/Android.mk deleted file mode 100644 index a59e32e5..00000000 --- a/contrib/android_binary_only/jni/Android.mk +++ /dev/null @@ -1,74 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := i2pd -LOCAL_CPP_FEATURES := rtti exceptions -LOCAL_C_INCLUDES += $(IFADDRS_PATH) $(LIB_SRC_PATH) $(LIB_CLIENT_SRC_PATH) $(DAEMON_SRC_PATH) -LOCAL_STATIC_LIBRARIES := \ - boost_system \ - boost_date_time \ - boost_filesystem \ - boost_program_options \ - crypto ssl \ - miniupnpc -LOCAL_LDLIBS := -lz - -LOCAL_SRC_FILES := $(IFADDRS_PATH)/ifaddrs.c \ - $(wildcard $(LIB_SRC_PATH)/*.cpp)\ - $(wildcard $(LIB_CLIENT_SRC_PATH)/*.cpp)\ - $(DAEMON_SRC_PATH)/UnixDaemon.cpp \ - $(DAEMON_SRC_PATH)/Daemon.cpp \ - $(DAEMON_SRC_PATH)/UPnP.cpp \ - $(DAEMON_SRC_PATH)/HTTPServer.cpp \ - $(DAEMON_SRC_PATH)/I2PControl.cpp \ - $(DAEMON_SRC_PATH)/i2pd.cpp -include $(BUILD_EXECUTABLE) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_system -LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_system.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_date_time -LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_date_time.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_filesystem -LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_filesystem.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_program_options -LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_program_options.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := crypto -LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libcrypto.a -LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := ssl -LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libssl.a -LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include -LOCAL_STATIC_LIBRARIES := crypto -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := miniupnpc -LOCAL_SRC_FILES := $(MINIUPNP_PATH)/miniupnpc-2.1/$(TARGET_ARCH_ABI)/lib/libminiupnpc.a -LOCAL_EXPORT_C_INCLUDES := $(MINIUPNP_PATH)/miniupnpc-2.1/include -include $(PREBUILT_STATIC_LIBRARY) diff --git a/contrib/android_binary_only/jni/Application.mk b/contrib/android_binary_only/jni/Application.mk deleted file mode 100644 index 5d54645b..00000000 --- a/contrib/android_binary_only/jni/Application.mk +++ /dev/null @@ -1,40 +0,0 @@ -APP_ABI := all -#APP_ABI += x86 -#APP_ABI += x86_64 -#APP_ABI += armeabi-v7a -#APP_ABI += arm64-v8a -#can be android-3 but will fail for x86 since arch-x86 is not present at ndkroot/platforms/android-3/ . libz is taken from there. -APP_PLATFORM := android-14 - -NDK_TOOLCHAIN_VERSION := clang -APP_STL := c++_static - -# Enable c++17 extensions in source code -APP_CPPFLAGS += -std=c++17 -fvisibility=default -fPIE - -APP_CPPFLAGS += -DANDROID_BINARY -DANDROID -D__ANDROID__ -DUSE_UPNP -APP_LDFLAGS += -rdynamic -fPIE -pie -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -APP_CPPFLAGS += -DANDROID_ARM7A -endif - -# Forcing debug optimization. Use `ndk-build NDK_DEBUG=1` instead. -#APP_OPTIM := debug - -# git clone https://github.com/PurpleI2P/Boost-for-Android-Prebuilt.git -b boost-1_72_0 -# git clone https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git -# git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git -# git clone https://github.com/PurpleI2P/android-ifaddrs.git -# change to your own -I2PD_LIBS_PATH = /path/to/libraries -BOOST_PATH = $(I2PD_LIBS_PATH)/Boost-for-Android-Prebuilt -OPENSSL_PATH = $(I2PD_LIBS_PATH)/OpenSSL-for-Android-Prebuilt -MINIUPNP_PATH = $(I2PD_LIBS_PATH)/MiniUPnP-for-Android-Prebuilt -IFADDRS_PATH = $(I2PD_LIBS_PATH)/android-ifaddrs - -# don't change me -I2PD_SRC_PATH = $(PWD)/../.. - -LIB_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd -LIB_CLIENT_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd_client -DAEMON_SRC_PATH = $(I2PD_SRC_PATH)/daemon diff --git a/contrib/android_binary_pack/.gitignore b/contrib/android_binary_pack/.gitignore deleted file mode 100644 index bad5f807..00000000 --- a/contrib/android_binary_pack/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -archive -i2pd_*_android_binary.zip diff --git a/contrib/android_binary_pack/build-archive b/contrib/android_binary_pack/build-archive deleted file mode 100755 index 30f5b48d..00000000 --- a/contrib/android_binary_pack/build-archive +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2013-2020, The PurpleI2P Project -# -# This file is part of Purple i2pd project and licensed under BSD3 -# -# See full license text in LICENSE file at top of project tree - -GITDESC=$(git describe --tags) - -declare -A ABILIST=( - ["armeabi-v7a"]="armv7l" - ["arm64-v8a"]="aarch64" - ["x86"]="x86" - ["x86_64"]="x86_64" -) - -# Remove old files and archives -if [ -d archive ]; then - rm -r archive -fi - -if [ -f ../i2pd_*_android_binary.zip ]; then - rm i2pd_*_android_binary.zip -fi - -# Prepare files for package -mkdir archive - -for ABI in "${!ABILIST[@]}"; do - if [ -f ../android_binary_only/libs/${ABI}/i2pd ]; then - cp ../android_binary_only/libs/${ABI}/i2pd archive/i2pd-${ABILIST[$ABI]} - fi -done - -cp i2pd archive/i2pd -cp -rH ../android/assets/certificates archive/ -cp -rH ../android/assets/tunnels.conf.d archive/ -cp -H ../android/assets/i2pd.conf archive/ -cp -H ../android/assets/tunnels.conf archive/ - -# Compress files -cd archive -zip -r6 ../i2pd_${GITDESC}_android_binary.zip . - -# Remove temporary folder -cd .. -rm -r archive diff --git a/contrib/android_binary_pack/i2pd b/contrib/android_binary_pack/i2pd deleted file mode 100755 index a91c42a1..00000000 --- a/contrib/android_binary_pack/i2pd +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2013-2020, The PurpleI2P Project -# -# This file is part of Purple i2pd project and licensed under BSD3 -# -# See full license text in LICENSE file at top of project tree -# -# That script written for use with Termux. - -# https://stackoverflow.com/a/246128 -SOURCE="${0}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" - -arch=$(uname -m) - -screenfind=$(which screen) -if [ -z $screenfind ]; then - echo "Can't find 'screen' installed. That script needs it!"; - exit 1; -fi - -if [ -z i2pd-$arch ]; then - echo "Can't find i2pd binary for your architecture."; - exit 1; -fi - -screen -AmdS i2pd ./i2pd-$arch --datadir=$DIR