stremio-shell: fix server start, adopt.
- autostart server.js using a node symlink and remove the stremio-server script - install an icon to the proper location (fixes missing icon in most icon themes) - replace the stremio script with a symlink to the binary.
This commit is contained in:
parent
9c450388e1
commit
1e66920b88
1 changed files with 18 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'stremio-shell'
|
||||
pkgname=stremio-shell
|
||||
version=4.4.142
|
||||
revision=2
|
||||
revision=3
|
||||
_singleapplication_hash=4aeac8fa3e7e96385ba556346ebb6020e35ffdd8
|
||||
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
|
||||
build_style=qmake
|
||||
|
@ -12,7 +12,7 @@ makedepends="mpv-devel qt5-webview-devel qt5-webengine-devel
|
|||
depends="qt5-quickcontrols qt5-quickcontrols2 virtual?nodejs-runtime
|
||||
qt5-webengine"
|
||||
short_desc="Hub for video content aggregation"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
maintainer="mobinmob <mobinmob@disroot.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://www.stremio.com"
|
||||
distfiles="https://github.com/Stremio/stremio-shell/archive/v${version}.tar.gz
|
||||
|
@ -35,21 +35,27 @@ post_extract() {
|
|||
}
|
||||
|
||||
post_install() {
|
||||
|
||||
# Fix the bizarre locations
|
||||
vmkdir usr/lib/stremio
|
||||
mv "${DESTDIR}"/usr/opt/stremio/stremio ${DESTDIR}/usr/lib/stremio
|
||||
mv "${DESTDIR}/usr/opt/stremio/stremio" "${DESTDIR}/usr/lib/stremio"
|
||||
|
||||
# Move .desktop file to proper location
|
||||
vmkdir usr/share/applications
|
||||
mv "${DESTDIR}"/usr/opt/stremio/smartcode-stremio.desktop ${DESTDIR}/usr/share/applications
|
||||
mv "${DESTDIR}/usr/opt/stremio/smartcode-stremio.desktop" "${DESTDIR}/usr/share/applications"
|
||||
|
||||
echo "#!/bin/sh" > stremio
|
||||
echo "cd /usr/lib/stremio && exec ./stremio" >> stremio
|
||||
vbin stremio
|
||||
# Link executable in PATH
|
||||
vmkdir usr/bin
|
||||
ln -s /usr/lib/stremio/stremio "${DESTDIR}/usr/bin/stremio"
|
||||
|
||||
echo "#!/bin/sh" > stremio-server
|
||||
echo "cd /usr/lib/stremio && exec node server.js" >> stremio-server
|
||||
vbin stremio-server
|
||||
# Symlink node in the instalation directory
|
||||
ln -s /usr/bin/node "${DESTDIR}/usr/lib/stremio/node"
|
||||
|
||||
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/server.js ${DESTDIR}/usr/lib/stremio
|
||||
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/stremio.asar ${DESTDIR}/usr/lib/stremio
|
||||
# Install icon
|
||||
vmkdir usr/share/icons
|
||||
cp "${wrksrc}/images/stremio_window.png" "${DESTDIR}/usr/share/icons/smartcode-stremio.png"
|
||||
|
||||
# Copy server
|
||||
cp "${XBPS_SRCDISTDIR}/${pkgname}-${version}/server.js" "${DESTDIR}/usr/lib/stremio"
|
||||
cp "${XBPS_SRCDISTDIR}/${pkgname}-${version}/stremio.asar" "${DESTDIR}/usr/lib/stremio"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue