Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add LingTiGameAcc package #13

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions LingTiGameAcc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=LingTiGameAcc
PKG_VERSION:=2021
PKG_RELEASE:=1.4.4

PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=eSir Playground

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
CATEGORY:=eSir Playground
SUBMENU:=2. GameAcc
TITLE:=LingTi Game Accelerator
URL:=https://github.com/esirplayground/LingTiGameAcc
DEPENDS:=+kmod-tun
endef

define Package/$(PKG_NAME)/description
LingTi Game Acc is a Game Accelerator which is paid service.
endef

DIR_ARCH:=$(ARCH)

define Build/Prepare
mkdir $(PKG_BUILD_DIR)/$(PKG_NAME)
cp -r ./files/$(DIR_ARCH)/* $(PKG_BUILD_DIR)/$(PKG_NAME)/lingti
endef

define Build/Compile
endef

define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)/lingti $(1)/usr/bin


$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./root/etc/init.d/lingti $(1)/etc/init.d
endef

define Package/$(PKG_NAME)/postinst
#!/bin/sh
chmod +x $(1)/usr/bin/lingti
chmod +x $(1)/etc/init.d/lingti
endef

$(eval $(call BuildPackage,$(PKG_NAME)))
3 changes: 3 additions & 0 deletions LingTiGameAcc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LingTiGameAcc

This Tools can be functioning `independently` without luci app.
Binary file added LingTiGameAcc/files/aarch64/lingti
Binary file not shown.
Binary file added LingTiGameAcc/files/arm/lingti
Binary file not shown.
Binary file added LingTiGameAcc/files/mips/lingti
Binary file not shown.
Binary file added LingTiGameAcc/files/mipsel/lingti
Binary file not shown.
Binary file added LingTiGameAcc/files/x86_64/lingti
Binary file not shown.
28 changes: 28 additions & 0 deletions LingTiGameAcc/root/etc/init.d/lingti
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh /etc/rc.common

START=99

[ -d /var/bin ] || mkdir -p /var/bin
[ -f /var/bin/lingti ] || cp /usr/bin/lingti /var/bin/lingti

start() {
state=`pgrep -f "/var/bin/lingti"`
if [ ! -z "$state" ]; then
restart
else
/var/bin/lingti &
fi
echo "LingTiGameAcc Started..."
}

stop() {
kill -9 `pgrep -f "/var/bin/lingti"` 2>/dev/null
echo "LingTiGameAcc Stopped ..."
}

restart() {
stop
sleep 1
start
echo "Restarted."
}