summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Santini2018-04-02 19:12:09 +0200
committerGiovanni Santini2018-04-02 19:12:09 +0200
commite5088b0517fb1123a987988e6b74cf9ce3f7aecd (patch)
tree9e5a8dc98632e3f42465fce087fe9075debdad2b
parent506352c9e32b9ad34d330323579a167f816719e8 (diff)
downloadaur-e5088b0517fb1123a987988e6b74cf9ce3f7aecd.tar.gz
upgpkg: popcorntime 0.3.10-5
- Major rewrite of the PKGBUILD - Remove useless dependencies - Fixed annoying bug for the initial screen - Fix broken dependencies
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD106
2 files changed, 55 insertions, 59 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6497ac30326d..1924f20d6533 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,26 @@
-# Generated by mksrcinfo v8
-# Fri Jan 5 13:27:24 UTC 2018
pkgbase = popcorntime
pkgdesc = Stream movies from torrents. Skip the downloads. Launch, click, watch.
pkgver = 0.3.10
- pkgrel = 4
+ pkgrel = 5
url = http://popcorntime.sh/
arch = i686
arch = x86_64
license = GPL3
makedepends = npm
makedepends = bower
- makedepends = nodejs-grunt-cli
makedepends = gulp
makedepends = git
depends = alsa-lib
depends = gconf
depends = gtk2
depends = libnotify
+ depends = libxss
depends = libxtst
depends = nss
depends = ttf-font
optdepends = net-tools: vpn.ht client
options = !strip
- source = popcorn-desktop_0.3.10::git+https://github.com/popcorn-official/popcorn-desktop/#branch=master
+ source = popcorn-desktop::git+https://github.com/popcorn-official/popcorn-desktop/#commit=9e25e9f004bcab070cdecb201ba89da539b2f780
source = popcorntime.desktop
sha256sums = SKIP
sha256sums = 4422f21e16176fda697ed0c8a6d1fb6f9dd7c4bc3f3694f9bcc19cbe66630334
diff --git a/PKGBUILD b/PKGBUILD
index 144dcaacadad..78f7b2dc29ef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,38 +9,24 @@
pkgname=popcorntime
pkgver=0.3.10
-pkgrel=4
+pkgrel=5
pkgdesc="Stream movies from torrents. Skip the downloads. Launch, click, watch."
arch=('i686' 'x86_64')
url="http://popcorntime.sh/"
license=('GPL3')
-makedepends=(
- 'npm'
- 'bower'
- 'nodejs-grunt-cli'
- 'gulp'
- 'git'
-)
-depends=(
- 'alsa-lib'
- 'gconf'
- 'gtk2'
- 'libnotify'
- 'libxtst'
- 'nss'
- 'ttf-font'
-)
+makedepends=('npm' 'bower' 'gulp' 'git')
+depends=('alsa-lib' 'gconf' 'gtk2' 'libnotify' 'libxss' 'libxtst' 'nss' 'ttf-font')
optdepends=('net-tools: vpn.ht client')
options=('!strip')
#install="popcorntime.install"
# Needed variables for sources downloads
-#_commit_hash="commit=9e25e9f004bcab070cdecb201ba89da539b2f780"
-_commit_hash="branch=master"
+_commit_hash="commit=9e25e9f004bcab070cdecb201ba89da539b2f780"
+#_commit_hash="branch=master"
_pkgname="popcorn-desktop"
source=(
- "${_pkgname}_${pkgver}::git+https://github.com/popcorn-official/popcorn-desktop/#${_commit_hash}"
- "popcorntime.desktop"
+ "${_pkgname}::git+https://github.com/popcorn-official/popcorn-desktop/#${_commit_hash}"
+ "popcorntime.desktop"
)
sha256sums=('SKIP'
'4422f21e16176fda697ed0c8a6d1fb6f9dd7c4bc3f3694f9bcc19cbe66630334')
@@ -48,53 +34,65 @@ sha256sums=('SKIP'
# Useful variables for builds
[ "$CARCH" = "i686" ] && _platform=linux32
[ "$CARCH" = "x86_64" ] && _platform=linux64
-_srcdir="${_pkgname}_${pkgver}"
+_srcdir="${_pkgname}"
_bpath="${_srcdir}/build/Popcorn-Time/${_platform}"
# Building the package
prepare() {
- cd "${srcdir}/${_srcdir}"
-
- msg2 "Installing npm, bower and missing dependencies..."
- # Using a different folder for the cache, makes the system cleaner
- _cache=`npm config get cache`
- npm config set cache "$srcdir/npm_cache"
- msg2 "Cache changed from $_cache to `npm config get cache`"
-
- #msg2 "Install missing dependencies"
- #missing_ones="thepiratebay@1.4.0"
- #for package in $missing_ones
- #do
- # msg2 "Installing missing dependency $package"
- # npm install "$package"
- #done
-
- # Actually install the stuff
- msg2 "Installing normal dependencies"
- npm install #-dd install
-
- # Restore the cache directory
- npm config set cache ${_cache}
+ cd "${srcdir}/${_srcdir}"
+
+ msg2 "Installing npm, bower and missing dependencies..."
+ # Using a different folder for the cache, makes the system cleaner
+ _cache=`npm config get cache`
+ npm config set cache "$srcdir/npm_cache"
+ msg2 "Cache changed from $_cache to `npm config get cache`"
+
+ msg2 "Install missing dependencies, if any"
+ # Build is almost always broken with newer NPMs. Install a good one and use it
+ missing_deps="npm@5.3"
+ for package in $missing_deps
+ do
+ msg2 "Installing missing dependency $package"
+ npm install "$package"
+ done
+
+ msg2 "Set up the \$PATH to allow npm-installed executables..."
+ export PATH="$PWD/node_modules/.bin:$PATH"
+
+ msg2 "Patching wrong packages versions..."
+ msg "Patching Vodo provider (butter-provider-vodo)..."
+ # Obviously, when I try to update Node software, some dev makes big updates.
+ # These are from less than a week ago; just fetch the old working version
+ sed -E 's|(.*vodo.*)",|\1#f61e70217711b4a29ff50618d28e8d4170d63fe5",|' -i package.json
+
+ # Actually install the stuff
+ msg2 "Installing normal dependencies"
+ npm install #-dd install
+
+ # Restore the cache directory
+ npm config set cache ${_cache}
}
build() {
- cd "${srcdir}/${_srcdir}"
+ cd "${srcdir}/${_srcdir}"
- gulp build
+ gulp build
}
package() {
- cd "${srcdir}/${_bpath}"
+ cd "${srcdir}/${_bpath}"
- mkdir -p "${pkgdir}/usr/share/${pkgname}"
- mkdir -p "${pkgdir}/usr/bin"
+ mkdir -p "${pkgdir}/usr/share/${pkgname}"
+ mkdir -p "${pkgdir}/usr/bin"
- find . -type f -exec install -D {} ${pkgdir}/usr/share/${pkgname}/{} \;
+ find . -type f -exec install -D {} ${pkgdir}/usr/share/${pkgname}/{} \;
+ # Remove customly installed npm, if any
+ rm -rf "${pkgdir}/usr/share/${pkgname}/node_modules/npm"
- install -Dm644 "${srcdir}/${_srcdir}/src/app/images/icon.png" "${pkgdir}/usr/share/pixmaps/popcorntime.png"
- chmod +x "${pkgdir}/usr/share/${pkgname}/Popcorn-Time"
+ install -Dm644 "${srcdir}/${_srcdir}/src/app/images/icon.png" "${pkgdir}/usr/share/pixmaps/popcorntime.png"
+ chmod +x "${pkgdir}/usr/share/${pkgname}/Popcorn-Time"
- ln -s "/usr/share/${pkgname}/Popcorn-Time" "${pkgdir}/usr/bin/${pkgname}"
+ ln -s "/usr/share/${pkgname}/Popcorn-Time" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 "${srcdir}/popcorntime.desktop" "${pkgdir}/usr/share/applications/popcorntime.desktop"
+ install -Dm644 "${srcdir}/popcorntime.desktop" "${pkgdir}/usr/share/applications/popcorntime.desktop"
}