Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: M0Rf30
- pkgname=flixtor
- pkgver=0.1.4
- pkgrel=1
- pkgdesc="Flixtor streams movies, series, videos and animes from Torrents."
- arch=('x86_64' 'i686')
- url="https://github.com/TorrentLookup/Flixtor/ http://www.flixtor.com/"
- license=('GPL3')
- makedepends=('nodejs' 'nodejs-grunt-cli' 'ruby-compass-alpha')
- depends=('ttf-ms-fonts')
- options=('!strip')
- install="flixtor.install"
- _gitname="Flixtor"
- source=("https://github.com/TorrentLookup/Flixtor/archive/v${pkgver}.tar.gz"
- "https://raw.githubusercontent.com/TorrentLookup/Flixtor/v${pkgver}/images/flixtor-ico.png"
- "flixtor.install"
- "flixtor.desktop"
- "Gruntfile.js"
- "package.json")
- prepare() {
- test ${arch} == "i686" && _platform="linux32" || _platform="linux64"
- }
- build() {
- cd "${srcdir}/${_gitname}-${pkgver}"
- cp ../Gruntfile.js ../package.json .
- npm install
- # Get dependencies
- msg2 "Getting dependencies"
- npm install
- # Copy local node-webkit (will be used if grunt wants the same version)
- if [ -d /usr/lib/node-webkit/ ]
- then
- _nwver=$(pacman -Q node-webkit | cut -d" " -f 2 | cut -d- -f1)
- install -d "${srcdir}/${_gitname}-${pkgver}/build/cache/${_platform}/${_nwver}"
- install /usr/lib/node-webkit/* "${srcdir}/${_gitname}-${pkgver}/build/cache/${_platform}/${_nwver}"
- fi
- # Build
- msg2 "Prepare for ${_platform}"
- msg2 "Building"
- grunt build
- # Thanks to Revelation60 for pointing it out
- # https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0
- msg2 "Patching program to fix libudev.so.0 problem"
- cd "${srcdir}/${_gitname}-${pkgver}/build/releases/Popcorn-Time/${_platform}/Popcorn-Time"
- sed -i 's/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x30/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x31/g' Popcorn-Time
- }
- package() {
- test ${arch} == "i686" && _platform="linux32" || _platform="linux64"
- msg2 "Prepare for ${_platform}"
- cd "${srcdir}"
- _bpath="${srcdir}/${_gitname}-${pkgver}/build/releases/Popcorn-Time/${_platform}/Popcorn-Time"
- install -dm755 "${pkgdir}/usr/share/${pkgname}"
- install -dm755 "${pkgdir}/usr/bin"
- # Program
- mv "${_bpath}/Popcorn-Time" "${_bpath}/flixtor"
- install -Dm755 "${_bpath}/flixtor" "${pkgdir}/usr/share/${pkgname}/"
- install -Dm644 "${_bpath}/nw.pak" "${pkgdir}/usr/share/${pkgname}/"
- install -Dm644 "${_bpath}/libffmpegsumo.so" "${pkgdir}/usr/share/${pkgname}/"
- # Link to program
- mkdir -p "${pkgdir}/usr/bin"
- ln -s "/usr/share/${pkgname}/flixtor" "${pkgdir}/usr/bin/${pkgname}"
- # Desktop file
- install -Dm644 "${srcdir}/flixtor.desktop" "${pkgdir}/usr/share/applications/flixtor.desktop"
- # Icon
- install -Dm644 "${srcdir}/flixtor-ico.png" "${pkgdir}/usr/share/pixmaps/flixtor.png"
- }
- md5sums=('94e93a5969a9e3855565565f98c3ae5c'
- '3b2c42be51b39aff65dc2c67bb94dc27'
- 'ea6fed9bb4cb7d7e6848ae43d755f407'
- '2716817a9ce83bb89c75aa82d7f4dcf8'
- 'cdc6f827b1da93030015438431a8fc73'
- '9871ff96b3e092a17ee4bb54e091d83e')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement