Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
11069fa0
Commit
11069fa0
authored
Aug 18, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add epm play virtualhere
parent
1f533231
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
0 deletions
+105
-0
virtualhere.sh
play.d/virtualhere.sh
+74
-0
virtualhere.sh
repack.d/virtualhere.sh
+31
-0
No files found.
play.d/virtualhere.sh
0 → 100755
View file @
11069fa0
#!/bin/sh
PKGNAME
=
virtualhere
PRODUCTDIR
=
/opt/
$PKGNAME
BINNAME
=
vhusbd
SUPPORTEDARCHES
=
"x86_64 armhf mips mipsel aarch64 x86"
DESCRIPTION
=
'Generic VirtualHere USB Server from the official site'
.
$(
dirname
$0
)
/common.sh
arch
=
"
$(
$DISTRVENDOR
-a
)
"
case
"
$arch
"
in
x86_64
)
file
=
"vhusbdx86_64"
;;
x86
)
file
=
"vhusbdi386"
;;
armhf
)
file
=
"vhusbdarm"
;;
mips
)
file
=
"vhusbdmips"
;;
mipsel
)
file
=
"vhusbdmipsel"
;;
aarch64
)
file
=
"vhusbdarm64"
;;
*
)
fatal
"
$arch
arch is not supported"
;;
esac
pkgtype
=
"
$(
$DISTRVENDOR
-p
)
"
tdir
=
$(
mktemp
-d
)
mkdir
-p
$tdir
/opt/
$PKGNAME
/
cd
$tdir
||
fatal
# https://github.com/virtualhere/script/blob/main/install_server
epm tool eget
-O
opt/
$PKGNAME
/
$BINNAME
https://www.virtualhere.com/sites/default/files/usbserver/
$file
||
fatal
chmod
0755 opt/
$PKGNAME
/
$BINNAME
pack_tar
()
{
local
tarname
=
"
$1
"
local
file
=
"
$2
"
local
destfile
=
"
$3
"
[
-n
"
$destfile
"
]
||
destfile
=
"
$PRODUCTDIR
/
$(
basename
$file
)
"
local
dest
=
$(
dirname
$destfile
)
mkdir
-p
.
$dest
[
-s
.
$dest
/
$(
basename
$file
)
]
||
cp
-v
$file
.
$dest
/
a
=
''
tar
cf
$tarname
.
$(
dirname
$dest
)
}
VERSION
=
"
$(
epm tool eget
-O-
https://virtualhere.com/usb_server_software |
grep
"<b>Version [0-9.]*</b>"
|
sed
-e
's|.*<b>Version \([0-9.]*\)</b>.*|\1|'
)
"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version for
$PKGNAME
"
PKG
=
$PKGNAME
-
$VERSION
.tar
pack_tar
$PKG
opt/
$PKGNAME
/
$BINNAME
epm
install
--repack
"
$PKG
"
RES
=
$?
rm
-rf
$tdir
[
"
$RES
"
=
"0"
]
||
exit
$RES
echo
echo
"Note: run
# serv
$PKGNAME
on
to enable and start
$PKGNAME
system service
"
repack.d/virtualhere.sh
0 → 100755
View file @
11069fa0
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
virtualhere
BINFILE
=
vhusbd
.
$(
dirname
$0
)
/common.sh
subst
"s|^Group:.*|Group: Networking/Remote access|"
$SPEC
#subst "s|^License: unknown$|License: GPLv2|" $SPEC
subst
"s|^URL:.*|URL: https://virtualhere.com/usb_server_software|"
$SPEC
subst
"s|^Summary:.*|Summary: Generic VirtualHere USB Server|"
$SPEC
mkdir
-p
$BUILDROOT
/etc/systemd/system/
cat
<<
EOF
>
$BUILDROOT
/etc/systemd/system/
$PRODUCT
.service
[Unit]
Description=VirtualHere Server
After=network.target
[Service]
Type=forking
ExecStart=
$PRODUCTDIR
/
$BINFILE
-b -c /etc/virtualhere/config.ini
[Install]
WantedBy=multi-user.target
EOF
mkdir
-p
$BUILDROOT
/etc/
$PRODUCT
/
pack_dir /etc/
$PRODUCT
pack_file /etc/systemd/system/
$PRODUCT
.service
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment