1. # Maintainer: pureboys <yuyuud@[email protected]>
  2. pkgname='kikoplay'
  3. pkgver=0.9.2
  4. pkgrel=1
  5. pkgdesc="linux danmaku player"
  6. arch=('x86_64')
  7. license=('GPL3')
  8. url="https://github.com/KikoPlayProject/KikoPlay"
  9. # using standalone liblua53.a, remove 'lua53' from depends.
  10. depends=('mpv' 'qhttpengine')
  11. makedepends=('cmake' 'git')
  12. optdepends=('aria2: for downloading')
  13. conflicts=('kikoplay-bin')
  14. source=(
  15. "https://github.com/KikoPlayProject/KikoPlay/archive/refs/tags/${pkgver}.tar.gz"
  16. "git+https://github.com/KikoPlayProject/KikoPlayScript"
  17. )
  18. sha256sums=(
  19. "909991a88bd2e176d89abe959259a69f00501ed4aab95b91be20829c072527e3"
  20. SKIP
  21. )
  22. prepare() {
  23. # rename directory to "KikoPlay" to match the KikoPlay.pro file.
  24. # otherwise qmake could not find the KikoPlay.pro file.
  25. [ -d "KikoPlay" ] && rm -rf "KikoPlay"
  26. mv "${srcdir}/KikoPlay-${pkgver}" "KikoPlay"
  27. }
  28. build() {
  29. # https://github.com/KikoPlayProject/KikoPlay/issues/97#issuecomment-1427057614
  30. # compile a standalone liblua53.a, remove lua53 from depends.
  31. cmake -B"${srcdir}/build-lua53" -S"${srcdir}/KikoPlay/Script/lua"
  32. cd "${srcdir}/build-lua53"
  33. make
  34. ln -sf "${srcdir}/build-lua53/libmyLua53.a" "${srcdir}/KikoPlay/lib/x64/linux/liblua53.a"
  35. ln -sf "${srcdir}/build-lua53/libmyLua53.a" "${srcdir}/KikoPlay/Script/lua/liblua53.a"
  36. # compile kikoplay
  37. mkdir -p "${srcdir}/build"
  38. cd "${srcdir}/build"
  39. qmake "${srcdir}/KikoPlay"
  40. make
  41. ## only for test, place the "script" under the path of KikoPlay binary
  42. ## then we can test the script function without packaging or installing KikoPlay
  43. #mkdir -p "${srcdir}/build/script"
  44. #cp -r "${srcdir}"/KikoPlayScript/* "${srcdir}/build/script"
  45. }
  46. package() {
  47. cd "${srcdir}/KikoPlay"
  48. install -Dm644 KikoPlay使用说明.pdf "${pkgdir}/usr/share/doc/kikoplay/help.pdf"
  49. cd "${srcdir}/build"
  50. make install INSTALL_ROOT="${pkgdir}"
  51. ln -sf KikoPlay "${pkgdir}/usr/bin/kikoplay"
  52. # also package KikoPlayScriptonly exclude .git directory
  53. install -dm755 "${pkgdir}/usr/share/kikoplay/script"
  54. cp -r "${srcdir}"/KikoPlayScript/* "${pkgdir}/usr/share/kikoplay/script"
  55. }