diff options
author | Giovanni Santini | 2018-12-18 21:06:03 +0100 |
---|---|---|
committer | Giovanni Santini | 2018-12-29 13:05:46 +0100 |
commit | 957478eabdc0be7217705624a960f4cd8d3391ea (patch) | |
tree | 48209e139c59b724f695d65db07b8fa8076db7d5 | |
parent | ff915a5633e69cf8f2a2179d1941dc68536b5fc2 (diff) | |
download | aur-957478eabdc0be7217705624a960f4cd8d3391ea.tar.gz |
upgpkg: popcorntime 0.3.10-13
- Major rewrite & cleanup
- Updated PopcornTime sources
- Gulp patch updated to match latest sources
- Switched to yarn from npm
- NW.js downgraded to 0.31.5, as it is the only one working
on my machine
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 77 | ||||
-rw-r--r-- | gulp-fixes.patch | 67 |
4 files changed, 80 insertions, 88 deletions
@@ -1,35 +1,29 @@ pkgbase = popcorntime pkgdesc = Stream movies from torrents. Skip the downloads. Launch, click, watch. pkgver = 0.3.10 - pkgrel = 12 + pkgrel = 13 url = https://popcorntime.sh/ arch = i686 arch = x86_64 license = GPL3 - makedepends = npm - makedepends = bower - makedepends = gulp makedepends = git + makedepends = npm + makedepends = yarn depends = alsa-lib depends = gconf depends = gtk2 - depends = libnotify - depends = libxss - depends = libxtst depends = nss + depends = libxtst + depends = libxss depends = ttf-font optdepends = net-tools: vpn.ht client options = !strip - source = popcorn-desktop::git+https://github.com/popcorn-official/popcorn-desktop/#commit=be800aa98cb9ef16f7e00737bbc51ba69204ed8f - source = gulp-fixes.patch + source = popcorn-desktop::git+https://github.com/popcorn-official/popcorn-desktop/#commit=e2351a0cbaf2c5c186df150476860a1677c2450e source = popcorntime.desktop + source = gulp-fixes.patch sha256sums = SKIP - sha256sums = fa2615680bcb591b9892e8d6394235436ffa65210be6e942b8ca91de982e8cd2 sha256sums = 4422f21e16176fda697ed0c8a6d1fb6f9dd7c4bc3f3694f9bcc19cbe66630334 - source_i686 = https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.31.5/0.31.5-linux-ia32.zip - sha256sums_i686 = 78241eb9e051dff300ea310c7fb44093cd242be9f88e7659b0db991f378adbc3 - source_x86_64 = https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.31.5/0.31.5-linux-x64.zip - sha256sums_x86_64 = c7f4620cd51f3df1a573c84f42e57a575d320788730693b157a52115b73f3edc + sha256sums = e1fc82b712babc4d4d7e07cce0af42100eb19b037c36fdb97c13324f6773846f pkgname = popcorntime diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c725f3d34fab --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore specific package deps (nvm) +deps/ @@ -9,88 +9,84 @@ pkgname=popcorntime pkgver=0.3.10 -pkgrel=12 +pkgrel=13 pkgdesc="Stream movies from torrents. Skip the downloads. Launch, click, watch." arch=('i686' 'x86_64') url="https://popcorntime.sh/" license=('GPL3') -depends=('alsa-lib' 'gconf' 'gtk2' 'libnotify' 'libxss' 'libxtst' 'nss' 'ttf-font') -makedepends=('npm' 'bower' 'gulp' 'git') +depends=(alsa-lib gconf gtk2 nss libxtst libxss ttf-font) +makedepends=(git npm yarn) optdepends=('net-tools: vpn.ht client') options=('!strip') #install="popcorntime.install" # Needed variables for sources downloads -_commit_hash="commit=be800aa98cb9ef16f7e00737bbc51ba69204ed8f" +_commit_hash="commit=e2351a0cbaf2c5c186df150476860a1677c2450e" #_commit_hash="branch=master" _pkgname="popcorn-desktop" -# Useful variables for builds -_nwjs="0.31.5" +# NW.js version to use while building +_nwjs="0.31.5" # e.g. 0.31.5 +# Missing dependencies to install +#_missing_deps="underscore@~1.8.3" + +# Build-related stuff [ "$CARCH" = "i686" ] && _platform=linux32 [ "$CARCH" = "x86_64" ] && _platform=linux64 _srcdir="${_pkgname}" _bpath="${_srcdir}/build/Popcorn-Time/${_platform}" -# Dependencies to install -# natives: solves some builds problems with gulp < 4 -# See: https://github.com/gulpjs/gulp/issues/2162#issuecomment-384380989, read all the thread -_missing_deps="natives@1.1.4 bufferutil@3.0.5" # Get sources only here source=( "${_pkgname}::git+https://github.com/popcorn-official/popcorn-desktop/#${_commit_hash}" - "gulp-fixes.patch" "popcorntime.desktop" + "gulp-fixes.patch" ) -source_i686=("https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/$_nwjs/$_nwjs-linux-ia32.zip") -source_x86_64=("https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/$_nwjs/$_nwjs-linux-x64.zip") sha256sums=('SKIP' - 'fa2615680bcb591b9892e8d6394235436ffa65210be6e942b8ca91de982e8cd2' - '4422f21e16176fda697ed0c8a6d1fb6f9dd7c4bc3f3694f9bcc19cbe66630334') -sha256sums_i686=('78241eb9e051dff300ea310c7fb44093cd242be9f88e7659b0db991f378adbc3') -sha256sums_x86_64=('c7f4620cd51f3df1a573c84f42e57a575d320788730693b157a52115b73f3edc') + '4422f21e16176fda697ed0c8a6d1fb6f9dd7c4bc3f3694f9bcc19cbe66630334' + 'e1fc82b712babc4d4d7e07cce0af42100eb19b037c36fdb97c13324f6773846f') # Building the package prepare() { cd "${srcdir}/${_srcdir}" - # Using a different folder for the cache, makes the system cleaner - # Thanks to Eschwartz for the tip! - export npm_config_cache="$srcdir/npm_cache" - msg2 "npm cache changed to `npm config get cache`" + msg2 "Apply Gulpfile fixes ..." + git apply "$srcdir/gulp-fixes.patch" - #msg2 "Set up the \$PATH to allow npm-installed executables..." - #export PATH="$PWD/node_modules/.bin:$PATH" + # Thanks to Eschwartz for the tip! yarn edition + export YARN_CACHE_FOLDER="$srcdir/npm_cache" - msg2 "Patching wrong packages versions, if any ..." - # 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 + #msg2 "Patching wrong packages versions, if any ..." + # Keeping this as example, in case needed in the future #msg "Patching Vodo provider (butter-provider-vodo)..." #sed -E 's|(.*vodo.*)",|\1#f61e70217711b4a29ff50618d28e8d4170d63fe5",|' -i package.json # Actually install the stuff msg2 "Installing normal dependencies" - npm install #-dd install + yarn install msg2 "Install missing dependencies, if any ..." - # Build is almost always broken with newer NPMs. Install a good one and use it + # Here specific version of the packages will be installed for package in $_missing_deps do msg2 "Installing missing dependency $package" - npm install "$package" + yarn install "$package" done - # Use upstream nw.js, to avoid possible binary malware - sed -i "s|get.popcorntime.sh/repo/nw|dl.nwjs.io|" gulpfile.js - # And use latest version of nw.js - sed -i "s|\(const nwVersion = '\)[0-9.]\+|\1$_nwjs|" gulpfile.js - # Fix problems with the dependecies list function with newer npm versions - patch -Np1 -i "$srcdir/gulp-fixes.patch" + # Change NW.js version, if defined + if [ -n "$_nwjs" ] + then + msg2 "Changing NW.js version to $_nwjs ..." + sed -i "s|\(const nwVersion = '\)[0-9.]\+|\1$_nwjs|" gulpfile.js + fi } build() { + # Re-set all the needed information + export YARN_CACHE_FOLDER="$srcdir/npm_cache" + cd "${srcdir}/${_srcdir}" - gulp build + yarn build } package() { @@ -100,15 +96,6 @@ package() { mkdir -p "${pkgdir}/usr/bin" find . -type f -exec install -D {} ${pkgdir}/usr/share/${pkgname}/{} \; - # Remove customly installed npm, if any - for package in $_missing_deps - do - local package_path=`echo $package | sed 's|@.*||'` - rm -rf "${pkgdir}/usr/share/${pkgname}/node_modules/$package_path" - done - - # Install the FFmpeg library with additional codecs - install -Dm644 "${srcdir}/libffmpeg.so" "${pkgdir}/usr/share/${pkgname}/lib/libffmpeg.so" install -Dm644 "${srcdir}/${_srcdir}/src/app/images/icon.png" "${pkgdir}/usr/share/pixmaps/popcorntime.png" chmod +x "${pkgdir}/usr/share/${pkgname}/Popcorn-Time" diff --git a/gulp-fixes.patch b/gulp-fixes.patch index 8e4b2182389a..23d096b5ea8b 100644 --- a/gulp-fixes.patch +++ b/gulp-fixes.patch @@ -1,38 +1,47 @@ -From b4877d9bed9cb1205e13e1c3432011fce9776e14 Mon Sep 17 00:00:00 2001 +From e7d40b904df28f67d775d48e36dbf4f5b385bc37 Mon Sep 17 00:00:00 2001 From: Giovanni Santini <giovannisantini93@yahoo.it> -Date: Tue, 24 Jul 2018 17:01:02 +0200 -Subject: [PATCH] Ignore issues showing missing dependencies There are issues - showing dependencies using such function, due to npm updates; ignore them and - live happily! +Date: Sat, 29 Dec 2018 01:53:12 +0100 +Subject: [PATCH] Small fixes 1. Path adjusted for FFmpeg library for Linux and + OSX targets 2. Small changes in checking for the downloaded FFmpeg library --- - gulpfile.js | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) + gulpfile.js | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js -index f367fbe1..e1895e2b 100644 +index c6c8739e..26a6fbbe 100644 --- a/gulpfile.js +++ b/gulpfile.js -@@ -64,10 +64,7 @@ const parsePlatforms = () => { - // returns an array of paths with the node_modules to include in builds
- const parseReqDeps = () => {
- return new Promise((resolve, reject) => {
-- exec('npm ls --production=true --parseable=true', {maxBuffer: 1024 * 500}, (error, stdout, stderr) => {
-- if (error || stderr) {
-- reject(error || stderr);
-- } else {
-+ exec('npm ls --production=true --parseable=true', (error, stdout, stderr) => {
- // build array
- let npmList = stdout.split('\n');
-
-@@ -83,7 +80,6 @@ const parseReqDeps = () => { -
- // return
- resolve(npmList);
-- }
- });
- });
- };
+@@ -306,7 +306,7 @@ gulp.task('nwjs', () => { + // get ffmpeg lib
+ gulp.task('downloadffmpeg', done => {
+ var parsed = ffmpegurl.substring(ffmpegurl.lastIndexOf('/'));
+- if(!fs.existsSync('./cache/ffmpeg/')){
++ if(!fs.existsSync('./cache/ffmpeg/' + parsed)){
+ console.log('FFmpeg download starting....');
+ return download(ffmpegurl).pipe(gulp.dest('./cache/ffmpeg/')).on('error', function (err) {
+ console.error(err);
+@@ -322,8 +322,10 @@ gulp.task('unzipffmpeg', () => { + // Need to check Correct folder on every Nw.js Upgrade as long as we use nwjs Binary directly
+ var ffpath = './build/' + pkJson.name + '/' + parsePlatforms() + '/' + pkJson.name + '.app/Contents/Versions/69.0.3497.100';
+ } else {
+- var ffpath = './build/' + pkJson.name + '/' + parsePlatforms();
++ var ffpath = './build/' + pkJson.name + '/' + parsePlatforms();
+ }
++ if (parsePlatforms()[0].indexOf('win') === -1)
++ ffpath = ffpath + '/lib';
+ return gulp.src('./cache/ffmpeg/*.{tar,tar.bz2,tar.gz,zip}')
+ .pipe(decompress({ strip: 1 }))
+ .pipe(gulp.dest(ffpath))
+@@ -343,6 +345,8 @@ gulp.task('unzipffmpegcache', () => { + } else {
+ var platform = parsePlatforms()[0];
+ var bin = path.join('cache', nwVersion + '-' + nwFlavor, platform);
++ if (platform.indexOf('win') === -1)
++ bin = bin + '/lib';
+ }
+ return gulp.src('./cache/ffmpeg/*.{tar,tar.bz2,tar.gz,zip}')
+ .pipe(decompress({ strip: 1 }))
-- -2.18.0 +2.20.1 |