diff options
author | bastimeyer | 2017-11-18 15:33:27 +0100 |
---|---|---|
committer | bastimeyer | 2017-11-18 15:45:39 +0100 |
commit | c85326500dc21b23651e395a420897e3655d07f1 (patch) | |
tree | c101bb122cf85a640032573be869d24d945ed6ba | |
parent | f978870761c2ee16161e38531be5fb9313a97151 (diff) | |
download | aur-c85326500dc21b23651e395a420897e3655d07f1.tar.gz |
Rewrite package and remove install file
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | streamlink-twitch-gui.install | 15 |
3 files changed, 55 insertions, 37 deletions
@@ -1,25 +1,23 @@ pkgbase = streamlink-twitch-gui pkgdesc = A multi platform Twitch.tv browser for Streamlink pkgver = 1.3.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/streamlink/streamlink-twitch-gui - install = streamlink-twitch-gui.install arch = i686 arch = x86_64 license = MIT + makedepends = rsync depends = alsa-lib depends = gconf depends = glib2 depends = gtk2 - depends = libnotify depends = libxtst depends = nss - depends = xdg-utils depends = streamlink provides = streamlink-twitch-gui conflicts = streamlink-twitch-gui-git options = !strip - source = https://raw.githubusercontent.com/streamlink/streamlink-twitch-gui/master/LICENSE + source = https://raw.githubusercontent.com/streamlink/streamlink-twitch-gui/v1.3.1/LICENSE sha256sums = a3f70e2c1fabdc05bde59f20d77863362d127b1c231c735a0422fa079c40415f source_i686 = https://github.com/streamlink/streamlink-twitch-gui/releases/download/v1.3.1/streamlink-twitch-gui-v1.3.1-linux32.tar.gz sha256sums_i686 = 9ab3d004d0dc1ddfd94b93e0ffb8600a19fc0413befeca8b56f6f018d71d91f1 @@ -2,7 +2,7 @@ # Co-Maintainer: Sebastian Meyer <mail@bastimeyer.de> pkgname=streamlink-twitch-gui pkgver=1.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="A multi platform Twitch.tv browser for Streamlink" arch=("i686" "x86_64") url="https://github.com/streamlink/streamlink-twitch-gui" @@ -12,37 +12,72 @@ depends=( "gconf" "glib2" "gtk2" - "libnotify" "libxtst" "nss" - "xdg-utils" "streamlink" ) +makedepends=( + "rsync" +) provides=("streamlink-twitch-gui") conflicts=("streamlink-twitch-gui-git") options=(!strip) -install=$pkgname.install -source=("https://raw.githubusercontent.com/streamlink/streamlink-twitch-gui/master/LICENSE") -source_i686=("https://github.com/streamlink/streamlink-twitch-gui/releases/download/v$pkgver/streamlink-twitch-gui-v$pkgver-linux32.tar.gz") -source_x86_64=("https://github.com/streamlink/streamlink-twitch-gui/releases/download/v$pkgver/streamlink-twitch-gui-v$pkgver-linux64.tar.gz") +source=("https://raw.githubusercontent.com/streamlink/streamlink-twitch-gui/v${pkgver}/LICENSE") +source_i686=("https://github.com/streamlink/streamlink-twitch-gui/releases/download/v${pkgver}/streamlink-twitch-gui-v${pkgver}-linux32.tar.gz") +source_x86_64=("https://github.com/streamlink/streamlink-twitch-gui/releases/download/v${pkgver}/streamlink-twitch-gui-v${pkgver}-linux64.tar.gz") sha256sums=('a3f70e2c1fabdc05bde59f20d77863362d127b1c231c735a0422fa079c40415f') sha256sums_i686=('9ab3d004d0dc1ddfd94b93e0ffb8600a19fc0413befeca8b56f6f018d71d91f1') sha256sums_x86_64=('06bf0e4516f189fa686b935a9455b8129d3113115c531f0bfcb9b9927422b5a6') package() { - cd "$srcdir/$pkgname" + cd "${srcdir}/${pkgname}" + + # set up package directories + install -d \ + "${pkgdir}/opt/${pkgname}/" \ + "${pkgdir}/usr/bin/" \ + "${pkgdir}/usr/share/applications/" - install -d "$pkgdir/opt/$pkgname" - install -d "$pkgdir/usr/bin/" + # copy licenses + install -Dm644 \ + -t "${pkgdir}/usr/share/licenses/${pkgname}/" \ + "${srcdir}/LICENSE" \ + "./credits.html" - sed -i "s:Exec=\$HERE/start.sh:Exec=/usr/bin/$pkgname:g" add-menuitem.sh - sed -i "s:CHECKNEWVERSIONS=true:CHECKNEWVERSIONS=false:g" start.sh + # copy application content and ignore certain files and dirs + rsync -a \ + --exclude "start.sh" \ + --exclude "add-menuitem.sh" \ + --exclude "remove-menuitem.sh" \ + --exclude "credits.html" \ + --exclude "icons" \ + "./" \ + "${pkgdir}/opt/${pkgname}/" - cp -R * "$pkgdir/opt/$pkgname" + # create custom start script and disable version check + cat > "${pkgdir}/usr/bin/${pkgname}" <<-EOF + #!/usr/bin/env bash + /opt/${pkgname}/${pkgname} "\$@" --no-version-check + EOF + chmod +x "${pkgdir}/usr/bin/${pkgname}" - ln -s "/opt/$pkgname/start.sh" "$pkgdir/usr/bin/$pkgname" - ln -s "/usr/lib/libudev.so" "$pkgdir/opt/$pkgname/libudev.so.0" + # copy icons + for res in 16 32 48 64 128 256; do + install -Dm644 \ + "./icons/icon-${res}.png" \ + "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${pkgname}.png" + done - install -d "$pkgdir/usr/share/licenses/$pkgname" - cp "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" + # create menu shortcut + cat > "${pkgdir}/usr/share/applications/${pkgname}.desktop" <<-EOF + [Desktop Entry] + Type=Application + Name=Streamlink Twitch GUI + GenericName=Twitch.tv browser for Streamlink + Comment=Browse Twitch.tv and watch streams in your videoplayer of choice + Keywords=streamlink;livestreamer;twitch; + Categories=AudioVideo; + Exec=/usr/bin/${pkgname} + Icon=${pkgname} + EOF } diff --git a/streamlink-twitch-gui.install b/streamlink-twitch-gui.install deleted file mode 100644 index 246c87ce9f1d..000000000000 --- a/streamlink-twitch-gui.install +++ /dev/null @@ -1,15 +0,0 @@ -post_install() { - /opt/streamlink-twitch-gui/add-menuitem.sh -} - -pre_remove() { - /opt/streamlink-twitch-gui/remove-menuitem.sh -} - -pre_upgrade() { - /opt/streamlink-twitch-gui/remove-menuitem.sh -} - -post_upgrade() { - /opt/streamlink-twitch-gui/add-menuitem.sh -} |