mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-04-30 22:09:50 +08:00
minieap: add package
This commit is contained in:
parent
741eb4376c
commit
d1705362d3
50
net/minieap/Makefile
Normal file
50
net/minieap/Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright (C) 2016 Openwrt.org
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=minieap
|
||||
PKG_VERSION:=0.93
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/updateing/minieap/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=752cec83f453ab2b44503156e0a84a82c475b9a231f45d407b6b7eb75de60f68
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/minieap
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Campus Network
|
||||
TITLE:=Extendable 802.1x client
|
||||
URL:=https://github.com/updateing/minieap
|
||||
endef
|
||||
|
||||
define Package/minieap/description
|
||||
Extendable 802.1x client with Ruijie v3 (v4) plugin.
|
||||
endef
|
||||
|
||||
define Package/minieap/conffiles
|
||||
/etc/minieap.conf
|
||||
endef
|
||||
|
||||
define Package/minieap/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/minieap.conf $(1)/etc/minieap.conf
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/minieap $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,minieap))
|
13
net/minieap/patches/001-enable-gbconv.patch
Normal file
13
net/minieap/patches/001-enable-gbconv.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -17,8 +17,8 @@ PLUGIN_MODULES += if_impl_sockraw
|
||||
# PLUGIN_MODULES += ifaddrs
|
||||
|
||||
ENABLE_DEBUG := false
|
||||
-ENABLE_ICONV := true
|
||||
-ENABLE_GBCONV := false
|
||||
+ENABLE_ICONV := false
|
||||
+ENABLE_GBCONV := true
|
||||
STATIC_BUILD := false
|
||||
|
||||
# If your platform has iconv_* integrated into libc, change to false
|
12
net/minieap/patches/002-disable-hdd-serial-query.patch
Normal file
12
net/minieap/patches/002-disable-hdd-serial-query.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/packet_plugin/rjv3/packet_plugin_rjv3_priv.c
|
||||
+++ b/packet_plugin/rjv3/packet_plugin_rjv3_priv.c
|
||||
@@ -132,7 +132,8 @@ static void rjv3_set_hdd_serial(uint8_t* serial_buf, char* fake_serial) {
|
||||
memmove(serial_buf, fake_serial, strnlen(fake_serial, MAX_PROP_LEN));
|
||||
return;
|
||||
}
|
||||
-#ifdef __linux__
|
||||
+ PR_WARN("请使用 --fake-serial 选项手动指定硬盘序列号");
|
||||
+#if 0
|
||||
FILE* _fp = fopen("/etc/mtab", "r");
|
||||
char _line_buf[MAX_LINE_LEN] = {0};
|
||||
char* _line_buf_dev, *_line_buf_mountpoint;
|
11
net/minieap/patches/003-remove-systemctl.patch
Normal file
11
net/minieap/patches/003-remove-systemctl.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -87,7 +87,7 @@ install: minieap minieap.1.gz minieap.service
|
||||
install -m 644 minieap.1.gz $(DESTDIR)$(PREFIX)/share/man/man1/
|
||||
install -d $(DESTDIR)$(SYSTEMDDIR)/system/
|
||||
install -m 644 minieap.service $(DESTDIR)$(SYSTEMDDIR)/system/
|
||||
- -systemctl enable minieap
|
||||
+ # -systemctl enable minieap
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
33
net/sysuh3c/Makefile
Normal file
33
net/sysuh3c/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sysuh3c
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/haswelliris/h3c.git
|
||||
PKG_SOURCE_DATE:=2019-03-01
|
||||
PKG_SOURCE_VERSION:=8a3e0b5a9a5d989e7d8b2105d09a394c3663e016
|
||||
PKG_MIRROR_HASH:=693fd9f81242edb3459a1298f4c850984e59fb44ef6fb4a40fdfcdd3c14acfdb
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/sysuh3c
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Campus Network
|
||||
TITLE:=H3C client
|
||||
endef
|
||||
|
||||
define Package/sysuh3c/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/h3c $(1)/usr/sbin/sysuh3c
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/sysuh3c.config $(1)/etc/config/sysuh3c
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/sysuh3c.init $(1)/etc/init.d/sysuh3c
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sysuh3c))
|
6
net/sysuh3c/files/sysuh3c.config
Executable file
6
net/sysuh3c/files/sysuh3c.config
Executable file
@ -0,0 +1,6 @@
|
||||
|
||||
config login
|
||||
option blockstartup '1'
|
||||
option enable '0'
|
||||
option method 'xor'
|
||||
|
11
net/sysuh3c/files/sysuh3c.defaults
Executable file
11
net/sysuh3c/files/sysuh3c.defaults
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@sysuh3c[-1]
|
||||
add ucitrack sysuh3c
|
||||
set ucitrack.@sysuh3c[-1].init=sysuh3c
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
43
net/sysuh3c/files/sysuh3c.init
Executable file
43
net/sysuh3c/files/sysuh3c.init
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
START=70
|
||||
|
||||
run_h3c()
|
||||
{
|
||||
local enable
|
||||
config_get_bool enable $1 enable
|
||||
|
||||
if [ "$enable" == 1 ]; then
|
||||
local username
|
||||
local password
|
||||
local method
|
||||
local ifname
|
||||
local blockstartup
|
||||
|
||||
config_get username $1 username
|
||||
config_get password $1 password
|
||||
config_get method $1 method
|
||||
config_get ifname $1 ifname
|
||||
config_get_bool blockstartup $1 blockstartup
|
||||
|
||||
if [ "$blockstartup" == 1 ]; then
|
||||
while ! sysuh3c -u $username -p $password -i $ifname -m $method ; do
|
||||
echo sysuh3c: process exited unexpectedly, restarting..
|
||||
sleep 1
|
||||
done
|
||||
else
|
||||
sleep 5
|
||||
sysuh3c -u $username -p $password -i $ifname -m $method &
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
config_load sysuh3c
|
||||
config_foreach run_h3c login
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
killall sysuh3c >/dev/null 2>&1
|
||||
}
|
25
net/sysuh3c/patches/100-gcc-10.patch
Normal file
25
net/sysuh3c/patches/100-gcc-10.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- a/h3c.h
|
||||
+++ b/h3c.h
|
||||
@@ -120,19 +120,19 @@
|
||||
#define MD5_XOR 0
|
||||
#define MD5_MD5 1
|
||||
|
||||
-struct eapol {
|
||||
+extern struct eapol {
|
||||
unsigned char version;
|
||||
unsigned char type;
|
||||
unsigned short length;
|
||||
}__attribute__ ((packed)) eapol;
|
||||
|
||||
-struct eap {
|
||||
+extern struct eap {
|
||||
unsigned char code;
|
||||
unsigned char id;
|
||||
unsigned short length;
|
||||
}__attribute__ ((packed)) eap;
|
||||
|
||||
-struct packet {
|
||||
+extern struct packet {
|
||||
struct ether_header eth_header;
|
||||
struct eapol eapol_header;
|
||||
struct eap eap_header;
|
55
utils/phicomm-k3screenctrl/Makefile
Normal file
55
utils/phicomm-k3screenctrl/Makefile
Normal file
@ -0,0 +1,55 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=phicomm-k3screenctrl
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
PKG_SOURCE_DATE:=2020-09-18
|
||||
PKG_SOURCE_VERSION:=d8896cfad4bdf39f58999f9420807f986300bada
|
||||
PKG_MIRROR_HASH:=348ddd828c309559a5b4afb34cfea19051b742c8918f22bc3be3e6f161421708
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Hamster Tian <haotia@gmail.com>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS+= -D_GNU_SOURCE
|
||||
|
||||
define Package/phicomm-k3screenctrl
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=@(TARGET_bcm53xx_DEVICE_phicomm-k3||TARGET_bcm53xx_generic_DEVICE_phicomm_k3) \
|
||||
+@KERNEL_DEVMEM +@BUSYBOX_CONFIG_ARPING +bc +bash +curl +coreutils +coreutils-od +jq
|
||||
TITLE:=LCD screen controller on PHICOMM K3
|
||||
URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
endef
|
||||
|
||||
define Package/phicomm-k3screenctrl/description
|
||||
K3 Screen Controller (k3screenctrl) is a program utilizing
|
||||
the LCD screen on PHICOMM K3 to display some stats.
|
||||
endef
|
||||
|
||||
define Package/phicomm-k3screenctrl/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/k3screenctrl $(1)/usr/bin/k3screenctrl
|
||||
|
||||
$(INSTALL_DIR) $(1)/lib/k3screenctrl $(1)/lib/k3screenctrl/oui
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||
$(INSTALL_CONF) $(CURDIR)/files/k3screenctrl.config $(1)/etc/config/k3screenctrl
|
||||
$(INSTALL_BIN) $(CURDIR)/files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,phicomm-k3screenctrl))
|
9
utils/phicomm-k3screenctrl/files/k3screenctrl.config
Normal file
9
utils/phicomm-k3screenctrl/files/k3screenctrl.config
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
config general
|
||||
option screen_time '30'
|
||||
option refresh_time '2'
|
||||
option pawd_hide '1'
|
||||
option psk_hide '1'
|
||||
option showmore '1'
|
||||
option city_checkip '0'
|
||||
option update_time '0'
|
19
utils/phicomm-k3screenctrl/files/k3screenctrl.init
Normal file
19
utils/phicomm-k3screenctrl/files/k3screenctrl.init
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=99
|
||||
|
||||
SCRIPTS_BASE=/lib/k3screenctrl/
|
||||
TEMP_DIR=/tmp/k3screenctrl
|
||||
|
||||
start() {
|
||||
mkdir -p $TEMP_DIR
|
||||
mkdir -p $TEMP_DIR/device_speed
|
||||
m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
|
||||
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 1 ] && d=1
|
||||
/usr/bin/k3screenctrl -m $m -d $d &
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall k3screenctrl
|
||||
}
|
Loading…
Reference in New Issue
Block a user