virtualhere.sh 814 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/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
32

33
add_libs_requires