diff options
author | Vladimir Borisov | 2019-01-16 09:33:07 +0200 |
---|---|---|
committer | Vladimir Borisov | 2019-01-16 09:33:07 +0200 |
commit | a37928ec6c955098c348c0cc72a05ff2b0e1de31 (patch) | |
tree | b7e466c043be1b8a034749b9230d92eb62653241 | |
parent | c1208578908df181555c4868645b1fbe2ae6a95b (diff) | |
download | aur-a37928ec6c955098c348c0cc72a05ff2b0e1de31.tar.gz |
Updated scripts; Build package from git; Install script
-rw-r--r-- | PKGBUILD | 78 | ||||
-rw-r--r-- | stremio.install | 37 |
2 files changed, 81 insertions, 34 deletions
@@ -1,41 +1,51 @@ -# Maintainer: Prasad Kumar -pkgname=stremio-beta -pkgver=4.4.10 +# Maintainer: Vladimir Borisov <vladimir@stremio.com> +_pkgname=stremio +pkgname=${_pkgname} +pkgver=4.4.25 pkgrel=1 -pkgdesc="Watch videos, movies, TV series and TV channels instantly. (Beta Version)" -arch=('x86_64') -url="https://stremio.com" -license=('custom') -provides=('stremio-beta') -makedepends=('sed') -options=('!strip') -source=("${pkgname}.appimage::https://dl.strem.io/linux/v${pkgver}/Stremio+${pkgver}.appimage") -sha512sums=('b48f3bdc7b849fee63cf826f8e6b767286897bc8b60b7ef8af4d24b6395568a1be81e87017e7fe7ccad5b9bdf941662ee3ffb0be94d0dea5a065811722de619c') +pkgdesc="The next generation media center" +arch=($(uname -m)) +url="https://www.stremio.com" +license=("MIT") +groups=() +depends=("nodejs" "ffmpeg" "qt5-webengine" "qt5-webchannel" "qt5-declarative" "qt5-quickcontrols" "qt5-quickcontrols2" "qt5-translations" "mpv" "openssl") +makedepends=("git" "wget" "qt5-tools" "librsvg") +provides=("${_pkgname}") +conflicts=("${_pkgname}") +replaces=("stremio-git") +backup=() +options=() -prepare() { - chmod +x ${pkgname}.appimage - ./${pkgname}.appimage --appimage-extract - find ${srcdir}/squashfs-root/ -type d -exec chmod 755 {} \; +install=stremio.install + +source=("${_pkgname}::git+https://github.com/Stremio/stremio-shell.git#branch=master") +noextract=() +md5sums=("SKIP") + +pkgver() { + cd "$srcdir/${_pkgname}" + grep -oPm1 'VERSION=\K.+' stremio.pro + # Git, tags available + #printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" } -package() { - cd "${srcdir}/squashfs-root/" - install -d $pkgdir/{opt/$pkgname,usr/bin} +prepare() { + cd "$srcdir/${_pkgname}" + if [ -n "$BRANCH" ]; then + git checkout "$BRANCH" + fi - cp -r "lib" "${pkgdir}/opt/${pkgname}/" - cp -r "libexec" "${pkgdir}/opt/${pkgname}/" - cp -r "plugins" "${pkgdir}/opt/${pkgname}/" - cp -r "qml" "${pkgdir}/opt/${pkgname}/" - cp -r "resources" "${pkgdir}/opt/${pkgname}/" - cp -r "translations" "${pkgdir}/opt/${pkgname}/" - install -Dm755 node "${pkgdir}/opt/${pkgname}/" - install -Dm644 qt.conf "${pkgdir}/opt/${pkgname}/" - install -Dm644 server.js "${pkgdir}/opt/${pkgname}/" - install -Dm755 stremio "${pkgdir}/opt/${pkgname}/" - install -Dm755 stremio.asar "${pkgdir}/opt/${pkgname}/" + git submodule update --init + make -f release.makefile clean +} + +build() { + cd "$srcdir/${_pkgname}" + make -f release.makefile PREFIX="$pkgdir" +} - ln -s /opt/${pkgname}/stremio "${pkgdir}"/usr/bin/stremio-beta - install -Dm644 stremio.desktop "$pkgdir/usr/share/applications/stremio-beta.desktop" - sed -i 's/Name=Stremio/Name=Stremio\ Beta/g; s/Exec=.\/stremio/Exec=env\ LD_PRELOAD="\/usr\/lib\/libnss3.so"\ stremio-beta/g; s/Icon=stremio/Icon=stremio-beta/g' $pkgdir/usr/share/applications/stremio-beta.desktop - install -Dm644 "stremio.png" "$pkgdir/usr/share/icons/stremio-beta.png" +package() { + cd "$srcdir/${_pkgname}" + export PREFIX="$pkgdir"; + make -f release.makefile install } diff --git a/stremio.install b/stremio.install new file mode 100644 index 000000000000..f1cfd11cbf56 --- /dev/null +++ b/stremio.install @@ -0,0 +1,37 @@ +post_install() { + +ln -s /opt/stremio/stremio /usr/bin/stremio + +xdg-desktop-menu install --mode system /opt/stremio/smartcode-stremio.desktop + +cd /opt/stremio/icons || exit 1 +regex="([^_]+)_([0-9]+).png$" +for file in *.png +do + if [[ $file =~ $regex ]] + then + icon="${BASH_REMATCH[1]##*/}" + size="${BASH_REMATCH[2]}" + xdg-icon-resource install --context apps --size "$size" "$file" "$icon" + fi +done +} + +pre_remove() { + +rm -f /usr/bin/stremio + +xdg-desktop-menu uninstall --mode system /opt/stremio/smartcode-stremio.desktop + +cd /opt/stremio/icons || exit 1 +regex="([^_]+)_([0-9]+).png$" +for file in *.png +do + if [[ $file =~ $regex ]] + then + icon="${BASH_REMATCH[1]##*/}" + size="${BASH_REMATCH[2]}" + xdg-icon-resource uninstall --context apps --size "$size" "$icon" + fi +done +} |