2020-09-03 03:20:38 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2020-08-17 19:54:31 -04:00
|
|
|
|
|
|
|
install -m 644 files/mjpg-streamer.service ${ROOTFS_DIR}/etc/systemd/system/mjpg-streamer.service
|
|
|
|
install -m 755 files/start-mjpg ${ROOTFS_DIR}/usr/local/bin/start-mjpg
|
2020-08-24 05:04:27 -04:00
|
|
|
mkdir -p ${ROOTFS_DIR}/usr/local/etc/mjpg-server/
|
|
|
|
install -m 755 files/config.sh ${ROOTFS_DIR}/usr/local/etc/mjpg-server/
|
2020-08-17 19:54:31 -04:00
|
|
|
|
2020-08-20 04:56:51 -04:00
|
|
|
if [[ ! -f ${ROOTFS_DIR}/usr/local/bin/mjpeg-server ]]; then
|
2020-08-24 05:04:27 -04:00
|
|
|
# Do some semi janky cross compilation since Golang won't let me set GOBIN when cross compiling (gogl plz fix)
|
2020-08-20 04:56:51 -04:00
|
|
|
GOPATH=/tmp/go GOARCH=arm64 go get github.com/blueimp/mjpeg-server
|
|
|
|
cp /tmp/go/bin/linux_arm64/mjpeg-server ${ROOTFS_DIR}/usr/local/bin/mjpeg-server
|
|
|
|
rm -rf /tmp/go
|
2020-08-17 19:54:31 -04:00
|
|
|
fi
|