summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorgrufo2016-04-16 02:11:02 +0200
committergrufo2016-04-16 02:11:02 +0200
commitf6fe3caf762155338cb5026800bc9fc948e4179c (patch)
treeb4f6c138dbe84a9f9f49a7138f67cbed55e0cb25 /PKGBUILD
downloadaur-f6fe3caf762155338cb5026800bc9fc948e4179c.tar.gz
Stream movies from torrents. Skip the downloads. Launch, click, watch. Repos of the original community edition.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD81
1 files changed, 81 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cd0d5e82776
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,81 @@
+# Maintainer: grufo <madmurphy333@gmail.com>
+
+pkgname="popcorntime-ce-git"
+_pkgname="popcorntime-ce"
+_device="desktop"
+pkgver=r191.fcd39e1
+pkgrel=1
+pkgdesc="Stream movies from torrents. Skip the downloads. Launch, click, watch. Repos of the original community edition."
+arch=("x86_64" "i686")
+url="http://popcorntime.ag/"
+license=("GPL3")
+depends=("alsa-lib" "desktop-file-utils" "gconf" "gtk2" "libnotify" "libxtst" "nodejs" "nss" "python" "ttf-font")
+makedepends=("git" "npm")
+optdepends=("net-tools: necessary for the new vpn feature" "ttf-liberation: open source ttf fonts")
+provides=("popcorntime" "popcorntime-ce")
+conflicts=("popcorntime-ce" "popcorntime-ce-bin")
+options=("!strip")
+install="popcorntime-ce.install"
+source=("git+https://github.com/PopcornTime-CE/${_device}.git"
+ "popcorntime-ce.install"
+ "popcorntime-ce.desktop")
+sha1sums=("SKIP"
+ "2c22a3f1d1335abe8d7ac7dd6a33933720ba30e4"
+ "219a9c7033361e1286967452868721302b1d6da7")
+
+_platform=$([ $CARCH = "x86_64" ] && echo "linux64" || echo "linux32")
+_execname="Popcorn-Time-CE"
+_bindir="${_device}/build/${_execname}/${_platform}"
+
+pkgver() {
+
+ cd "${_device}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+
+}
+
+prepare() {
+
+ cd "${srcdir}/${_device}"
+
+ npm install --user root
+
+ # Remove all references to ${srcdir}
+ find "${srcdir}/${_device}" -type f -print0 | xargs -0 sed -i "s|${srcdir}/${_device}|/usr/share/${_pkgname}|g"
+
+}
+
+build() {
+
+ cd "${srcdir}/${_device}"
+
+ "${srcdir}/${_device}/node_modules/.bin/gulp" build -p ${_platform}
+
+}
+
+package() {
+
+ cd "${srcdir}/${_bindir}"
+
+ install -dm755 "${pkgdir}/usr/share/${_pkgname}"
+ install -dm755 "${pkgdir}/usr/bin"
+
+ # Program
+ install -Dm755 "${srcdir}/${_bindir}/${_execname}" "${pkgdir}/usr/share/${_pkgname}/"
+ install -Dm644 "${srcdir}/${_device}/"{CHANGELOG.md,LICENSE.txt,package.json,README.md} "${pkgdir}/usr/share/${_pkgname}/"
+ install -Dm644 "${srcdir}/${_bindir}/"{icudtl.dat,libffmpegsumo.so,nw.pak} "${pkgdir}/usr/share/${_pkgname}/"
+
+ # Directories
+ cp -a "${srcdir}/${_device}/"{node_modules,src} "${pkgdir}/usr/share/${_pkgname}/"
+
+ # Link to program
+ ln -s "/usr/share/${_pkgname}/${_execname}" "${pkgdir}/usr/bin/${_pkgname}"
+
+ # Desktop file
+ install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+
+ # Icon
+ install -Dm644 "${srcdir}/${_device}/src/app/images/icon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
+
+}
+