Advertisement
davidva

PKGBUILD

Dec 19th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. pkgname=atraci-git
  2. pkgver=r252.c77af79
  3. pkgrel=2
  4. pkgdesc="Free music streaming player"
  5. arch=('i686' 'x86_64')
  6. url="http://getatraci.net/"
  7. license=('GPL3')
  8. depends=('nodejs' 'libnotify')
  9. makedepends=('git' 'nodejs-grunt-cli' 'ruby-compass-alpha')
  10. optdepends=('node-webkit: Allows you to skip downloading node-webkit')
  11. conflicts=('atraci-bin')
  12. provides=("atraci")
  13. options=('!strip')
  14.  
  15. [ "$CARCH" = "i686" ] && _platform=linux32
  16. [ "$CARCH" = "x86_64" ] && _platform=linux64
  17.  
  18. _gitname=atraci
  19. _DEST="/usr/share/atraci"
  20.  
  21. source=("git+https://github.com/Atraci/${_gitname}"
  22. "atraci.desktop")
  23.  
  24. pkgver() {
  25. cd "${srcdir}/${_gitname}"
  26. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  27. }
  28.  
  29. prepare() {
  30. cd "${srcdir}/${_gitname}"
  31.  
  32. # read video issues https://github.com/Atraci/Atraci/issues/69
  33. sed -i "s|version: '0.10.1'|version: '0.11.3'|g" Gruntfile.coffee
  34.  
  35. # Get dependencies
  36. npm cache clean
  37. npm config set registry http://registry.npmjs.org/
  38. npm install
  39.  
  40. : << 'COMMENT'
  41. # Copy local node-webkit (will be used if grunt wants the same version)
  42. if [ -d /usr/lib/node-webkit/ ]
  43. then
  44. _nwver=$(pacman -Q node-webkit | cut -d" " -f 2 | cut -d- -f1)
  45. install -d "${srcdir}/${_gitname}/cache/${_nwver}/${_platform}/"
  46. install /usr/lib/node-webkit/* "${srcdir}/${_gitname}/cache/${_nwver}/${_platform}/"
  47. fi
  48. COMMENT
  49. }
  50.  
  51. build() {
  52. cd "${srcdir}/${_gitname}"
  53.  
  54. # Build
  55. grunt build
  56.  
  57. # Thanks to Revelation60 for pointing it out
  58. # https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0
  59. msg2 "Patching node-webkit to fix libudev.so.0 problem"
  60. cd "${srcdir}/${_gitname}/build/Atraci/${_platform}/"
  61. sed -i 's/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x30/\x75\x64\x65\x76\x2E\x73\x6F\x2E\x31/g' Atraci
  62. }
  63.  
  64. package() {
  65. cd "${srcdir}/${_gitname}/build/Atraci/${_platform}/"
  66.  
  67. # Program
  68. msg2 "Installing program to ${_DEST}"
  69. install -dm755 "${pkgdir}${_DEST}"
  70. install -m755 "Atraci" "${pkgdir}${_DEST}"
  71. install -m644 "nw.pak" "${pkgdir}${_DEST}"
  72. install -m644 "libffmpegsumo.so" "${pkgdir}${_DEST}"
  73. install -m644 "icudtl.dat" "${pkgdir}${_DEST}"
  74.  
  75.  
  76. # Link to program
  77. msg2 "Symlink /usr/bin/${provides[0]} -> ${_DEST}/Atraci"
  78. install -dm755 "${pkgdir}/usr/bin"
  79. ln -s "${_DEST}/Atraci" "${pkgdir}/usr/bin/${provides[0]}"
  80.  
  81. # Desktop file
  82. install -Dm644 "${srcdir}/atraci.desktop" "${pkgdir}/usr/share/applications/atraci.desktop"
  83.  
  84. # Icon
  85. install -Dm644 "${srcdir}/${_gitname}/images/icon.png" "${pkgdir}/usr/share/pixmaps/atraci.png"
  86. }
  87.  
  88. md5sums=('SKIP'
  89. 'acf4beaa9c9af13179c691cdc7b730f5')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement