Advertisement
Guest User

Flixtor PKGBUILD

a guest
Apr 15th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. # Maintainer: M0Rf30
  2.  
  3. pkgname=flixtor
  4. pkgver=0.1.4
  5. pkgrel=1
  6. pkgdesc="Flixtor streams movies, series, videos and animes from Torrents."
  7. arch=('x86_64' 'i686')
  8. url="https://github.com/TorrentLookup/Flixtor/ http://www.flixtor.com/"
  9. license=('GPL3')
  10. makedepends=('nodejs' 'nodejs-grunt-cli' 'ruby-compass-alpha')
  11. depends=('ttf-ms-fonts')
  12. options=('!strip')
  13. install="flixtor.install"
  14. _gitname="Flixtor"
  15. source=("https://github.com/TorrentLookup/Flixtor/archive/v${pkgver}.tar.gz"
  16. "https://raw.githubusercontent.com/TorrentLookup/Flixtor/v${pkgver}/images/flixtor-ico.png"
  17. "flixtor.install"
  18. "flixtor.desktop"
  19. "Gruntfile.js"
  20. "package.json")
  21.  
  22. prepare() {
  23. test ${arch} == "i686" && _platform="linux32" || _platform="linux64"
  24. }
  25.  
  26. build() {
  27. cd "${srcdir}/${_gitname}-${pkgver}"
  28. cp ../Gruntfile.js ../package.json .
  29. npm install
  30. # Get dependencies
  31. msg2 "Getting dependencies"
  32. npm install
  33.  
  34. # Copy local node-webkit (will be used if grunt wants the same version)
  35. if [ -d /usr/lib/node-webkit/ ]
  36. then
  37. _nwver=$(pacman -Q node-webkit | cut -d" " -f 2 | cut -d- -f1)
  38. install -d "${srcdir}/${_gitname}-${pkgver}/build/cache/${_platform}/${_nwver}"
  39. install /usr/lib/node-webkit/* "${srcdir}/${_gitname}-${pkgver}/build/cache/${_platform}/${_nwver}"
  40. fi
  41.  
  42. # Build
  43. msg2 "Prepare for ${_platform}"
  44. msg2 "Building"
  45. grunt build
  46.  
  47. # Thanks to Revelation60 for pointing it out
  48. # https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0
  49. msg2 "Patching program to fix libudev.so.0 problem"
  50. cd "${srcdir}/${_gitname}-${pkgver}/build/releases/Popcorn-Time/${_platform}/Popcorn-Time"
  51. sed -i 's/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x30/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x31/g' Popcorn-Time
  52. }
  53.  
  54. package() {
  55. test ${arch} == "i686" && _platform="linux32" || _platform="linux64"
  56. msg2 "Prepare for ${_platform}"
  57. cd "${srcdir}"
  58.  
  59. _bpath="${srcdir}/${_gitname}-${pkgver}/build/releases/Popcorn-Time/${_platform}/Popcorn-Time"
  60.  
  61. install -dm755 "${pkgdir}/usr/share/${pkgname}"
  62. install -dm755 "${pkgdir}/usr/bin"
  63.  
  64. # Program
  65. mv "${_bpath}/Popcorn-Time" "${_bpath}/flixtor"
  66. install -Dm755 "${_bpath}/flixtor" "${pkgdir}/usr/share/${pkgname}/"
  67. install -Dm644 "${_bpath}/nw.pak" "${pkgdir}/usr/share/${pkgname}/"
  68. install -Dm644 "${_bpath}/libffmpegsumo.so" "${pkgdir}/usr/share/${pkgname}/"
  69.  
  70. # Link to program
  71. mkdir -p "${pkgdir}/usr/bin"
  72. ln -s "/usr/share/${pkgname}/flixtor" "${pkgdir}/usr/bin/${pkgname}"
  73.  
  74. # Desktop file
  75. install -Dm644 "${srcdir}/flixtor.desktop" "${pkgdir}/usr/share/applications/flixtor.desktop"
  76.  
  77. # Icon
  78. install -Dm644 "${srcdir}/flixtor-ico.png" "${pkgdir}/usr/share/pixmaps/flixtor.png"
  79. }
  80.  
  81. md5sums=('94e93a5969a9e3855565565f98c3ae5c'
  82. '3b2c42be51b39aff65dc2c67bb94dc27'
  83. 'ea6fed9bb4cb7d7e6848ae43d755f407'
  84. '2716817a9ce83bb89c75aa82d7f4dcf8'
  85. 'cdc6f827b1da93030015438431a8fc73'
  86. '9871ff96b3e092a17ee4bb54e091d83e')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement