void-packages/srcpkgs/stremio-shell/template
2019-03-08 19:16:05 -03:00

53 lines
2 KiB
Bash

# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.25
revision=1
_singleapplication_hash=6fbf6bffc848821d41a09ccd9fc0ede83bbbcdce
build_style=qmake
hostmakedepends="qt5-host-tools qt5-qmake"
makedepends="mpv-devel qt5-webview-devel qt5-webengine-devel
qt5-declarative-devel qt5-webchannel-devel qt5-location-devel
qt5-quickcontrols2-devel qt5-quickcontrols chromaprint-devel"
depends="qt5-quickcontrols qt5-quickcontrols2 virtual?nodejs-runtime"
short_desc="Hub for video content aggregation"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://www.stremio.com"
distfiles="https://github.com/Stremio/stremio-shell/archive/${version}.tar.gz
https://github.com/itay-grudev/SingleApplication/archive/${_singleapplication_hash}.tar.gz
https://dl.strem.io/four/v4.4.10/server.js
https://dl.strem.io/four/v4.4.10/stremio.asar"
checksum="f2f4f0432a9c84e6f4fc2039ee27cb3635ea4a9341f3f6c823fa7dc96a0a2f6b
11840ed3dc80a909980908e310dc370bca2f7f61c45101fdea00187f620a1ff1
52e453dc24e291b863582b250f5633d45d9634cafe24ac68165854b17b31114e
8abe09aa0c577b9be05a7343438f9a37718689f74b9d7a124590f5ba3bb2764f"
skip_extraction="server.js stremio.asar"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ${makedepends}"
fi
post_extract() {
rmdir deps/singleapplication
mv ../SingleApplication-${_singleapplication_hash} deps/singleapplication
}
post_install() {
# Fix the bizarre locations
vmkdir usr/lib/stremio
mv "${DESTDIR}"/usr/opt/stremio/stremio ${DESTDIR}/usr/lib/stremio
vmkdir 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
echo "#!/bin/sh" > stremio-server
echo "cd /usr/lib/stremio && exec node server.js" >> stremio-server
vbin stremio-server
mv ${XBPS_SRCDISTDIR}/${pkgname}-${version}/server.js ${DESTDIR}/usr/lib/stremio
mv ${XBPS_SRCDISTDIR}/${pkgname}-${version}/stremio.asar ${DESTDIR}/usr/lib/stremio
}