diff options
author | bastimeyer | 2022-02-22 14:56:51 +0100 |
---|---|---|
committer | bastimeyer | 2022-02-22 14:56:51 +0100 |
commit | 647a657b953e73669c46ed34c8f8fa316c861696 (patch) | |
tree | f66bdcffb3cdd4928dd31e87952286a464be064e | |
parent | b034d5dbfae80e5d9de136c4e88b8e80a19df65b (diff) | |
download | aur-647a657b953e73669c46ed34c8f8fa316c861696.tar.gz |
v2.0.0 - switch to building from source
The PKGBUILD of the old streamlink-twitch-gui AUR package has been moved
to streamlink-twitch-gui-bin. This PKGBUILD will now build from source,
excluding NW.js, which is pulled from the NW.js build server.
- Adjust temporary warning message in PKGBUILD
- Switch from pre-built sources to source tarball
- Add prepare and build hooks
- Remove unneeded install+upgrade hooks
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | streamlink-twitch-gui.install | 23 |
3 files changed, 60 insertions, 51 deletions
@@ -1,20 +1,25 @@ pkgbase = streamlink-twitch-gui pkgdesc = A multi platform Twitch.tv browser for Streamlink - pkgver = 1.13.0 - pkgrel = 2 + pkgver = 2.0.0 + pkgrel = 1 url = https://github.com/streamlink/streamlink-twitch-gui - install = streamlink-twitch-gui.install arch = i686 arch = x86_64 license = MIT + makedepends = nodejs + makedepends = yarn depends = gtk3 depends = libxss depends = nss depends = streamlink + noextract = nwjs-0.60.0-linux32.tar.gz + noextract = nwjs-0.60.0-linux64.tar.gz options = !strip - source_i686 = https://github.com/streamlink/streamlink-twitch-gui/releases/download/v1.13.0/streamlink-twitch-gui-v1.13.0-linux32.tar.gz - sha256sums_i686 = e8c149d05103d0da91262d5e2dff2edb4badc77f3b7cd049d420f39de573ae8d - source_x86_64 = https://github.com/streamlink/streamlink-twitch-gui/releases/download/v1.13.0/streamlink-twitch-gui-v1.13.0-linux64.tar.gz - sha256sums_x86_64 = 5b3ea3d701428bb96bbc26edd5aeaaf29d1a60a9d20d3a990fd37617a74c98fb + source = streamlink-twitch-gui-2.0.0.tar.gz::https://github.com/streamlink/streamlink-twitch-gui/archive/refs/tags/v2.0.0.tar.gz + sha256sums = 202061aca853a7b7a42b858c2544df8f4a9046f392da5c03372fd81f4473947e + source_i686 = nwjs-0.60.0-linux32.tar.gz::https://dl.nwjs.io/v0.60.0/nwjs-v0.60.0-linux-ia32.tar.gz + sha256sums_i686 = 18aeb06c86d58de396f4b2a08949c4cc9216b5fef931fe277196222173e35766 + source_x86_64 = nwjs-0.60.0-linux64.tar.gz::https://dl.nwjs.io/v0.60.0/nwjs-v0.60.0-linux-x64.tar.gz + sha256sums_x86_64 = 4c68dab80fdea548bc0f34b46c8cb4c40e7a51bc9b5ce20f813ab5ca2b5c69ba pkgname = streamlink-twitch-gui @@ -2,24 +2,21 @@ # !!!!!!!!!!!! THIS PACKAGE HAS BEEN RENAMED !!!!!!!!!!!! # ########################################################### # -# Please install the PKGBUILD from the +# The PKGBUILD of the old +# +# streamlink-twitch-gui +# +# AUR package has been moved to # # streamlink-twitch-gui-bin # -# AUR package instead. +# This PKGBUILD now builds from source, excluding NW.js # # ---- # # This message has been added as a temporary warning to -# let users of the old package know about the name change. -# -# A merge request with the new package (which will move all -# comments and votes) will be submitted shortly, once most -# users had enough time to see this message and switch. -# -# Please note that during this transition period, the -# PKGBUILD won't be changed to a build-from-source version -# and that it also won't be upgraded to the 2.0.0 release. +# let users of the old package know about the name change, +# and it will be removed after the next release. # # Users of Streamlink Twitch GUI will have to upgrade to # the 2.0.0 release until the end of February due to the @@ -31,24 +28,53 @@ ########################################################### -# Maintainer: Sebastian Meyer <mail@bastimeyer.de> +# Maintainer: Sebastian Meyer <mail@bastimeyer.de> + pkgname=streamlink-twitch-gui -pkgver=1.13.0 -pkgrel=2 +pkgver=2.0.0 +pkgrel=1 pkgdesc="A multi platform Twitch.tv browser for Streamlink" arch=("i686" "x86_64") url="https://github.com/streamlink/streamlink-twitch-gui" license=("MIT") depends=("gtk3" "libxss" "nss" "streamlink") +makedepends=("nodejs" "yarn") options=(!strip) -install=streamlink-twitch-gui.install -source_i686=("https://github.com/streamlink/${pkgname}/releases/download/v${pkgver}/${pkgname}-v${pkgver}-linux32.tar.gz") -source_x86_64=("https://github.com/streamlink/${pkgname}/releases/download/v${pkgver}/${pkgname}-v${pkgver}-linux64.tar.gz") -sha256sums_i686=('e8c149d05103d0da91262d5e2dff2edb4badc77f3b7cd049d420f39de573ae8d') -sha256sums_x86_64=('5b3ea3d701428bb96bbc26edd5aeaaf29d1a60a9d20d3a990fd37617a74c98fb') + +# https://github.com/streamlink/streamlink-twitch-gui/blob/v2.0.0/src/config/main.json#L4 +_nwjs=0.60.0 +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/streamlink/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz") +source_i686=("nwjs-${_nwjs}-linux32.tar.gz::https://dl.nwjs.io/v${_nwjs}/nwjs-v${_nwjs}-linux-ia32.tar.gz") +source_x86_64=("nwjs-${_nwjs}-linux64.tar.gz::https://dl.nwjs.io/v${_nwjs}/nwjs-v${_nwjs}-linux-x64.tar.gz") +noextract=("nwjs-${_nwjs}-linux"{32,64}".tar.gz") +sha256sums=('202061aca853a7b7a42b858c2544df8f4a9046f392da5c03372fd81f4473947e') +# https://dl.nwjs.io/${_nwjs}/SHASUMS256.txt{,.asc} (1E8BEE8D5B0C4CBCD6D19E2678680FA9E21BB40A - Roger Wang <roger@nwjs.io>) +sha256sums_i686=('18aeb06c86d58de396f4b2a08949c4cc9216b5fef931fe277196222173e35766') +sha256sums_x86_64=('4c68dab80fdea548bc0f34b46c8cb4c40e7a51bc9b5ce20f813ab5ca2b5c69ba') + +[[ "${CARCH}" == "x86_64" ]] && _arch=linux64 || _arch=linux32 + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # extract NW.js to the build/cache directory for nwjs-builder + mkdir -p "./build/cache/${_nwjs}-normal/${_arch}" + bsdtar -x --strip-components=1 \ + -C "./build/cache/${_nwjs}-normal/${_arch}" \ + -f "${srcdir}/nwjs-${_nwjs}-${_arch}.tar.gz" + + # install NodeJS dependencies + yarn install --pure-lockfile +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + yarn run grunt clean:tmp_prod webpack:prod "compile:${_arch}" +} package() { - cd "${srcdir}/${pkgname}" + # the dir of the built application + cd "${srcdir}/${pkgname}-${pkgver}/build/releases/${pkgname}/${_arch}" # set up package directories install -d \ @@ -68,7 +94,7 @@ package() { "./${pkgname}.appdata.xml" # copy application content and remove unneeded files and dirs - cp -a "./" "${pkgdir}/opt/${pkgname}/" + cp -a ./ "${pkgdir}/opt/${pkgname}/" rm -r "${pkgdir}/opt/${pkgname}/"{{add,remove}-menuitem.sh,LICENSE.txt,credits.html,"${pkgname}.appdata.xml",icons/} # create custom start script and disable version check @@ -94,6 +120,7 @@ package() { Comment=Browse Twitch.tv and watch streams in your videoplayer of choice Keywords=streamlink;twitch;streaming; Categories=AudioVideo;Network; + StartupWMClass=streamlink-twitch-gui Exec=/usr/bin/${pkgname} Icon=${pkgname} EOF diff --git a/streamlink-twitch-gui.install b/streamlink-twitch-gui.install deleted file mode 100644 index a1747a55616e..000000000000 --- a/streamlink-twitch-gui.install +++ /dev/null @@ -1,23 +0,0 @@ -_print_warning_msg() { - cat <<-EOF - ### WARNING - # The "streamlink-twitch-gui" AUR package has been - # renamed to "streamlink-twitch-gui-bin". - # - # If you're seeing this message, then you have installed the old package. - # The version of this package, 1.13.0, will stop working at the end of February 2022. - # Users of Streamlink Twitch GUI will have to upgrade to 2.0.0 until then. - # However, the 2.0.0 release will only be available on the -bin package for now. - # - # For more infos, please see the comment at the top of the package's PKGBUILD. - ### WARNING - EOF -} - -pre_install() { - _print_warning_msg -} - -pre_upgrade() { - _print_warning_msg -} |