summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJean Lucas2018-07-19 01:21:26 -0400
committerJean Lucas2018-07-19 01:34:22 -0400
commit854305bc24b19b17025078946b691667b325dc68 (patch)
tree31cf024dc90b7a1284668a750abb0068f5862e48 /PKGBUILD
parent371ecac68f27ff23f492eaf8d8e3f6b6e3245270 (diff)
downloadaur-854305bc24b19b17025078946b691667b325dc68.tar.gz
Refactor
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD85
1 files changed, 45 insertions, 40 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 95af7338de22..1cffc0caa450 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,57 +1,62 @@
-# Maintainer: Pieter Goetschalckx <3.14.e.ter [at] gmail [dot] com>
+# Maintainer: Jean Lucas <jean@4ray.co>
+# Contributor: Pieter Goetschalckx <3.14.e.ter [at] gmail [dot] com>
# Contributor: Eric Engestrom <aur [at] engestrom [dot] ch>
# Contributor: Attila Bukor <r1pp3rj4ck [at] w4it [dot] eu>
pkgname=popcorntime-git
_pkgname=popcorntime
_gitname=popcorn-desktop
-pkgver=r6211.db796345
+pkgver=0.3.10+6288+be800aa9
pkgrel=1
-pkgdesc="Stream movies and TV shows from torrents"
-arch=('i686' 'x86_64')
-url="https://popcorntime.sh"
-license=('GPL3')
-depends=('alsa-lib' 'gconf' 'gtk2' 'nss' 'ttf-font' 'libxtst' 'libnotify')
-makedepends=('git' 'npm')
-conflicts=('popcorntime' 'popcorn-time-ce')
-provides=('popcorntime')
-options=('!strip')
-source=("git+https://github.com/popcorn-official/${_gitname}.git#branch=development"
- "${_pkgname}.desktop")
-sha256sums=('SKIP'
- '7e22d234a2e7dd1e632e094154c44b31be7f93962df93dd865f3775b8e644c05')
-
-[ "$CARCH" = "i686" ] && _platform=linux32
-[ "$CARCH" = "x86_64" ] && _platform=linux64
+pkgdesc='Stream movies and TV shows from torrents'
+arch=(i686 x86_64)
+url=https://popcorntime.sh
+license=(GPL3)
+depends=(alsa-lib gconf gtk2 nss ttf-font libxtst libnotify)
+makedepends=(git wget)
+provides=(popcorntime)
+conflicts=(popcorntime popcorntime-ce)
+options=(!strip)
+source=(git+https://github.com/popcorn-official/$_gitname#branch=development
+ $_pkgname.desktop)
+sha512sums=(SKIP
+ 5a5ddbe76a8290a3a2789b7241865e91f8bb954273c49a39854226da6d34eb5dfbc3a18691da77853e1e72affa528355bacab4b0efd44b079d5bc7c2471b8cc7)
pkgver() {
- cd "${_gitname}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd $_gitname
+ printf $(git tag)+$(git rev-list --count HEAD)+$(git rev-parse --short HEAD)
}
-build() {
- cd "${_gitname}"
+#prepare() {
+# cd $_gitname
+# msg2 'Using upstream NW.js instead of downstream one...'
+# sed -i s#get.popcorntime.sh/repo/nw#dl.nwjs.io# gulpfile.js
+#}
+
+[ "$CARCH" = i686 ] && _arch=x86 _platform=linux32
+[ "$CARCH" = x86_64 ] && _arch=x64 _platform=linux64
+build() {
+ msg2 'Using temporary Node.js toolchain...'
+ _nodever=v6.14.3
+ _node=node-$_nodever-linux-$_arch
+ [ -f $_node.tar.xz ] || wget https://nodejs.org/dist/$_nodever/$_node.tar.xz
+ tar xfp node-$_nodever-linux-$_arch.tar.xz
+ export PATH=$PWD/$_node/bin:$PWD/$_gitname/node_modules/.bin:$PATH
+ export npm_config_cache=$PWD/npm_cache
+ cd $_gitname
npm install
- node_modules/.bin/gulp build --platforms ${_platform}
+ gulp build
}
package() {
- _bpath="${_gitname}/build/Popcorn-Time/${_platform}"
-
- install -dm755 "${pkgdir}/usr/share/${_pkgname}"
- install -dm755 "${pkgdir}/usr/bin"
-
- # Link to program
- ln -s "/usr/share/${_pkgname}/Popcorn-Time" "${pkgdir}/usr/bin/${_pkgname}"
-
- # Desktop file
- install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
-
- # Icon
- install -Dm644 "${_bpath}/src/app/images/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${_pkgname}.png"
-
- # Copy complete content of source archive to /usr/share/${_pkgname}/
- cp -a "${_bpath}"/* "${pkgdir}/usr/share/${_pkgname}/"
- chmod +x "${pkgdir}/usr/share/${_pkgname}/Popcorn-Time"
+ install -d $pkgdir/usr/{share/$_pkgname,bin}
+ install -Dm 644 $_pkgname.desktop $pkgdir/usr/share/applications/$_pkgname.desktop
+ cd $_gitname/build/Popcorn-Time/$_platform
+ install -Dm 644 src/app/images/icon.png $pkgdir/usr/share/icons/hicolor/256x256/apps/$_pkgname.png
+ cp -a . $pkgdir/usr/share/$_pkgname
+ cd $pkgdir/usr/share/$_pkgname
+ find . -type f -exec chmod -R +r,-x {} +
+ chmod +x Popcorn-Time
+ ln -s /usr/share/$_pkgname/Popcorn-Time $pkgdir/usr/bin/$_pkgname
}