MotionPro 1.2.6 (9.4) for Arch Linux

系统环境

最近狗东上NUC 10打折,只需要3799,果断入手新玩具 😃

 ██████████████████  ████████     localhost@localhost
 ██████████████████  ████████     OS: Manjaro 19.0.2 Kyria
 ██████████████████  ████████     Kernel: x86_64 Linux 5.4.24-1-MANJARO
 ██████████████████  ████████     Uptime: 22h 48m
 ████████                             ████████     Packages: 1217
 ████████   ████████    ████████     Shell: bash
 ████████   ████████    ████████     Resolution: 1920x1200
 ████████   ████████    ████████     DE: GNOME 3.34.4
 ████████   ████████    ████████     WM: Mutter
 ████████   ████████    ████████     WM Theme: Matcha-dark-sea
 ████████   ████████    ████████     GTK Theme: Matcha-dark-sea [GTK2/3]
 ████████   ████████    ████████     Icon Theme: Papirus-Dark-Maia
 ████████   ████████    ████████     Font: Noto Sans 11
 ████████   ████████    ████████     Disk: 52G / 473G (12%)
                                                                             CPU: Intel Core i7-10710U @ 12x 4.7GHz [70.0°C]
                                                                             GPU: Mesa DRI Intel(R) UHD Graphics (Comet Lake 3x8 GT2) 
                                                                             RAM: 3312MiB / 31831MiB

MotionPro打包

因为公司VPN使用的是MotionPro客户端,万幸有Linux版本,然而官网只提供了.sh安装包,万能的AUR上是9.3大版本的最新客户端,有点更新强迫症的我,果断决定修改下PKGBUILD,打包9.4大版本客户端。

不上传aur是因为已有9.3版本,9.4的功能和9.3没有任何区别,9.3版本兼容性更好,没必要再折腾上传

# Maintainer: Jingrong Chen <crazyboycjr at gmail dot com>
pkgname=motionpro
_pkgname=${pkgname//-/_}
pkgver=1.2.6
pkgrel=1
pkgdesc="Array Networks, MotionPro VPN, version 9.4.0.327"
arch=('x86_64')
url="https://support.arraynetworks.net/prx/001/http/supportportal.arraynetworks.net/downloads/downloads.html"
license=('none')
depends=()
source=("https://support.arraynetworks.net/prx/001/http/supportportal.arraynetworks.net/downloads/pkg_9_4_0_327/MP_Linux_1.2.6/MotionPro_Linux_Ubuntu_x64_v1.2.6.sh")  

package() {
	chmod +x "MotionPro_Linux_Ubuntu_x64_v1.2.6.sh"
	"./MotionPro_Linux_Ubuntu_x64_v1.2.6.sh" --keep --noexec
	cd MotionPro_Linux
	sed -i '31,34d' ./install.sh  #修改跳过root安装限制
	sed -i "s#prefix=#prefix=${pkgdir}#" ./install.sh
	sed -i '/^prefix=/amkdir -p $prefix' ./install.sh
	sed -i "s#target_dir=#target_dir=${pkgdir}#" ./install.sh
	sed -i '/^target_dir=/amkdir -p $target_dir' ./install.sh
	sed -i "s#hardware=\"#hardware=\"${pkgdir}#" ./install.sh
	sed -i '/^hardware=/amkdir -p $hardware' ./install.sh
	sed -i "s#start_script_path1=\"#start_script_path1=\"${pkgdir}#" ./install.sh
	sed -i "s#start_script_path2=\"#start_script_path2=\"${pkgdir}#" ./install.sh
	sed -i "s#desktop_target=#desktop_target=${pkgdir}#" ./install.sh
	sed -i '/^desktop_target=/amkdir -p $desktop_target' ./install.sh
	./install.sh
}
md5sums=('2e97f78c1d796b74b384abf7c15a7347')

修改完就可以愉快地makepkg,然后pacman -U安装啦!
详细makepkg教程参考archwki:https://wiki.archlinux.org/index.php/Makepkg

bug fix

MotionPro客户端在Linux有疯狂输入日志的bug,只要限制下日志目录的权限即可:

rm -rf /var/log/MotionPro
touch /var/log/MotionPro
chmod 600 /var/log/MotionPro
chattr +i /var/log/MotionPro
posted @ 2020-03-19 23:46  changediff  阅读(1600)  评论(0编辑  收藏  举报