mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 00:15:13 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,80 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright (C) 2023-2025 muink <https://github.com/muink>
|
||||
# Copyright (C) 2015-2017 wongsyrone
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=Toolkit
|
||||
PKG_UPSTREAM_VERSION:=0.4.0.2
|
||||
PKG_UPSTREAM_GITHASH:=631954eac283e38822c47e3122e9e2a3ac5984c6
|
||||
PKG_VERSION:=$(PKG_UPSTREAM_VERSION)~$(call version_abbrev,$(PKG_UPSTREAM_GITHASH))
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/muink/Toolkit.git
|
||||
PKG_SOURCE_VERSION:=$(PKG_UPSTREAM_GITHASH)
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Chengr28 <chengr28@twitter>
|
||||
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DPLATFORM_OPENWRT=ON
|
||||
|
||||
# Note: GCC 4.6 and 4.8 dont have complete C++11 support
|
||||
# Please use GCC 4.9 or higher to compile
|
||||
define Package/Toolkit
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=A useful and powerful toolkit (DNSPing+FileHash)
|
||||
URL:=https://github.com/chengr28/Toolkit
|
||||
DEPENDS:=+libstdcpp \
|
||||
@GCC_VERSION_4_6:BROKEN @GCC_VERSION_4_8:BROKEN
|
||||
endef
|
||||
|
||||
define Package/Toolkit/config
|
||||
if PACKAGE_Toolkit
|
||||
|
||||
config PACKAGE_Toolkit_advancedoptions
|
||||
bool "Use advanced compile options, see Makefile for details."
|
||||
default n
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/Toolkit/description
|
||||
A network util can ping with DNS request.
|
||||
endef
|
||||
|
||||
# Some advanced compile flags for expert
|
||||
ifneq ($(CONFIG_PACKAGE_Toolkit_advancedoptions),)
|
||||
# Try to reduce binary size
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
# Use Link time optimization
|
||||
TARGET_CFLAGS += -flto
|
||||
TARGET_LDFLAGS += -Wl,-flto
|
||||
endif
|
||||
|
||||
define Package/Toolkit/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{DNSPing,FileHash} $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,Toolkit))
|
||||
@@ -0,0 +1,61 @@
|
||||
Toolkit for OpenWrt/LEDE
|
||||
===
|
||||
|
||||
简介
|
||||
---
|
||||
|
||||
本项目是 [Toolkit][1] 运行在 OpenWrt/LEDE 上的软件包,目前包含 DNSPing 和 FileHash
|
||||
当前版本: 0.4.0.2-2
|
||||
|
||||
编译
|
||||
---
|
||||
|
||||
- 从 OpenWrt/LEDE 的 [SDK][S] 编译
|
||||
|
||||
```bash
|
||||
# 以 ar71xx 平台为例,此处文件名为示例,仅供参考,请以实际文件名为准
|
||||
# 有对应平台的 SDK 即可编译软件包,不仅限于 ar71xx
|
||||
tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
|
||||
# 进入 SDK 根目录
|
||||
cd OpenWrt-SDK-ar71xx-*
|
||||
# 首先验证 SDK 是否需要 ccache
|
||||
cat .config | grep CONFIG_CCACHE
|
||||
# 如果返回结果为 "y",则需要使用系统软件包管理器,如 yum、apt-get,安装 ccache
|
||||
# 获取 Makefile
|
||||
git clone --depth 1 --branch master --single-branch https://github.com/wongsyrone/openwrt-Toolkit.git package/Toolkit
|
||||
# 选择要编译的包 Network -> Toolkit 并进行个人定制,或者保持默认
|
||||
# 这时根据提供的选项确认依赖已经被选中
|
||||
make menuconfig
|
||||
# 开始编译
|
||||
make package/Toolkit/compile V=99
|
||||
# 编译结束之后从 bin 文件夹复制本程序的 ipk 文件到设备中,使用 opkg 进行安装
|
||||
```
|
||||
|
||||
- 从 OpenWrt/LEDE 的代码树编译
|
||||
|
||||
也可将本项目文件夹命名为 `Toolkit` 直接放置于 OpenWrt/LEDE 代码树的 `package` 文件夹下,之后按照编译的正常步骤进行,最后可在 bin 目录中找到编译好的软件包。下面简述编译步骤
|
||||
|
||||
```bash
|
||||
# 获取OpenWrt/LEDE代码树,根据需求选择稳定版(如Chaos Calmer 15.05)或开发版Trunk
|
||||
# 如果是 Trunk 使用
|
||||
git clone git://git.openwrt.org/openwrt.git
|
||||
# 如果是 Chaos Calmer 15.05 稳定版使用
|
||||
git clone git://git.openwrt.org/15.05/openwrt.git
|
||||
# 进入代码树根目录
|
||||
cd openwrt
|
||||
# 获取 Makefile
|
||||
git clone --depth 1 --branch master --single-branch https://github.com/wongsyrone/openwrt-Toolkit.git package/Toolkit
|
||||
# 首先选择目标平台以及设备型号
|
||||
# 接下来选择要编译的包 Network -> Toolkit 并进行个人定制,或者保持默认
|
||||
make menuconfig
|
||||
# 如果只想编译 Toolkit 使用
|
||||
make package/Toolkit/{prepare,compile} V=99
|
||||
# 如果想编译集成好 Toolkit 的固件使用
|
||||
make V=99
|
||||
```
|
||||
|
||||
----------
|
||||
|
||||
[1]: https://github.com/muink/Toolkit
|
||||
[2]: https://github.com/muink/Toolkit/tree/master/Documents
|
||||
[S]: http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk
|
||||
@@ -0,0 +1,33 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
# CMake minimum version
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Sub directories
|
||||
add_subdirectory(Source/DNSPing)
|
||||
--- a/Source/DNSPing/CMakeLists.txt
|
||||
+++ b/Source/DNSPing/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
# CMake minimum version
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Project name, build type and list all source files.
|
||||
project(DNSPing)
|
||||
--- a/Source/FileHash/CMakeLists.txt
|
||||
+++ b/Source/FileHash/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
# CMake minimum version
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Project name, build type, list all source files and sub directories.
|
||||
project(FileHash)
|
||||
Reference in new issue
Block a user