summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-30 07:32:10 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-30 17:50:13 -0300
commitf5bededb6c6d4960dfc14ec28d388824fbef2670 (patch)
treec4b57aaf9a3c90271f32c38b3331ff488feb8c90
parentf35fcdcf972b41911cf78b2050f78b24752451ca (diff)
popcorntime-git: add new package to [pcr]
-rw-r--r--pcr/popcorntime-git/PKGBUILD69
-rw-r--r--pcr/popcorntime-git/popcorntime.desktop10
-rw-r--r--pcr/popcorntime-git/popcorntime.install13
3 files changed, 92 insertions, 0 deletions
diff --git a/pcr/popcorntime-git/PKGBUILD b/pcr/popcorntime-git/PKGBUILD
new file mode 100644
index 000000000..c94701ff7
--- /dev/null
+++ b/pcr/popcorntime-git/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer (Arch): Pieter Goetschalckx <3.14.e.ter [at] gmail [dot] com>
+# Contributor (Arch): Eric Engestrom <aur [at] engestrom [dot] ch>
+# Contributor (Arch): Attila Bukor <r1pp3rj4ck [at] w4it [dot] eu>
+
+pkgname=popcorntime-git
+_pkgname=popcorntime
+_gitname=popcorn-desktop
+pkgver=r5925.1e2f946
+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' 'desktop-file-utils')
+makedepends=('git' 'npm' 'bower' 'nodejs-grunt-cli' 'gulp')
+conflicts=('popcorntime' 'popcorn-time-ce')
+provides=('popcorntime')
+options=('!strip')
+install=popcorntime.install
+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
+
+pkgver() {
+ cd "${_gitname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${_gitname}"
+
+ sed -i '/repo\/nw/d' gulpfile.js Gruntfile.js
+ npm install
+}
+
+build() {
+ cd "${_gitname}"
+ gulp build -p ${_platform}
+}
+
+package() {
+ _bpath="${_gitname}/build/Popcorn-Time/${_platform}"
+
+ install -dm755 "${pkgdir}/usr/share/${_pkgname}"
+ install -dm755 "${pkgdir}/usr/bin"
+
+ # Program
+ install -Dm755 "${_bpath}/Popcorn-Time" "${pkgdir}/usr/share/${_pkgname}/"
+ install -Dm644 "${_bpath}/"{icudtl.dat,libffmpegsumo.so,nw.pak,package.json} \
+ "${pkgdir}/usr/share/${_pkgname}/"
+
+ # Directories
+ cp -a "${_bpath}/"{locales,node_modules,src} "${pkgdir}/usr/share/${_pkgname}/"
+
+ # 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"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/popcorntime-git/popcorntime.desktop b/pcr/popcorntime-git/popcorntime.desktop
new file mode 100644
index 000000000..09549fc7b
--- /dev/null
+++ b/pcr/popcorntime-git/popcorntime.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=Popcorn Time
+Comment=Stream movies and TV shows from torrents
+Icon=popcorntime
+TryExec=popcorntime
+Exec=popcorntime %U
+MimeType=application/x-bittorrent;x-scheme-handler/magnet;
+Categories=AudioVideo;Video;Player;Network;FileTransfer;P2P;
+
diff --git a/pcr/popcorntime-git/popcorntime.install b/pcr/popcorntime-git/popcorntime.install
new file mode 100644
index 000000000..9e79427d2
--- /dev/null
+++ b/pcr/popcorntime-git/popcorntime.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+