toxin265

4kvideodownloader PKGBUILD working always

Jun 27th, 2020
261
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 4kvideodownloader PKGBUILD
  2. # Modified from original PKGBUILD from aur by Zoltan Guba
  3. # Maintainer: Muflone http://www.muflone.com/contacts/english/
  4.  
  5. pkgname=4kvideodownloader
  6. _pkgver=$(wget "https://www.4kdownload.com/downloads/" -q -O - |grep "tar.bz2" | grep "4kvideodownloader" |cut -d "_" -f4)
  7. pkgver=${_pkgver}
  8. pkgrel=1
  9. pkgdesc="Quickly download videos from YouTube in high-quality."
  10. arch=('x86_64')
  11. url="http://www.4kdownload.com/products/product-videodownloader"
  12. license=('custom:eula')
  13. depends=('qt5-script' 'qt5-declarative' 'portaudio' 'ffmpeg' 'openssl-1.0')
  14. makedepends=('chrpath')
  15. source=("${pkgname}_${pkgver}_amd64.tar.bz2"::"https://dl.4kdownload.com/app/${pkgname}_${pkgver%.*}_amd64.tar.bz2"
  16. "${pkgname}.desktop"
  17. "${pkgname}.png"
  18. "fix_symlink_path.patch")
  19.  
  20. md5sums=('SKIP'
  21. '4a92ff6032ed63200e6d38ad6d260830'
  22. '07a3760b1a475387376c0ee50da6d0b1'
  23. '14238d2a4bc8cba5ea450b7da9988a86')
  24.  
  25. prepare() {
  26. cd "${pkgname}"
  27. # Remove insecure RPATH
  28. chrpath --delete "${pkgname}-bin"
  29. # Fix symlink path
  30. patch -p1 -i "${srcdir}/fix_symlink_path.patch"
  31. }
  32.  
  33. package() {
  34. # Install desktop file
  35. install -m 755 -d "${pkgdir}/usr/share/applications"
  36. install -m 755 -t "${pkgdir}/usr/share/applications" "${pkgname}.desktop"
  37. # Install icon file
  38. install -m 755 -d "${pkgdir}/usr/share/pixmaps"
  39. install -m 644 -t "${pkgdir}/usr/share/pixmaps" "${pkgname}.png"
  40. # Install files
  41. cd "${pkgname}"
  42. install -m 755 -d "${pkgdir}/usr/lib/${pkgname}"
  43. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "${pkgname}-bin"
  44. install -m 755 -d "${pkgdir}/usr/lib/${pkgname}/audio"
  45. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}/audio" audio/*
  46. install -m 755 -d "${pkgdir}/usr/lib/${pkgname}/translation"
  47. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}/translation" translation/*
  48. # Temporarily ship bundled QT5 libraries as system libraries are unsupported
  49. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "${pkgname}.sh"
  50. sed -i 's/\$(dirname \$(readlink -f \"\$0\"))/\"\/usr\/lib\/4kvideodownloader\"/' "${pkgdir}/usr/lib/${pkgname}/${pkgname}.sh"
  51. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Concurrent.so.5"
  52. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Core.so.5"
  53. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5DBus.so.5"
  54. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Gui.so.5"
  55. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Network.so.5"
  56. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Positioning.so.5"
  57. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Qml.so.5"
  58. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Quick.so.5"
  59. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5WebChannel.so.5"
  60. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5WebEngineCore.so.5"
  61. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5WebEngineWidgets.so.5"
  62. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Widgets.so.5"
  63. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5XcbQpa.so.5"
  64. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}" "libQt5Xml.so.5"
  65. install -m 755 -d "${pkgdir}/usr/lib/${pkgname}/platforms"
  66. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}/platforms" platforms/*
  67. install -m 755 -d "${pkgdir}/usr/lib/${pkgname}/xcbglintegrations"
  68. install -m 755 -t "${pkgdir}/usr/lib/${pkgname}/xcbglintegrations" xcbglintegrations/*
  69. # Install launcher file
  70. install -m 755 -d "${pkgdir}/usr/bin"
  71. ln -s "/usr/lib/${pkgname}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
  72. # Install license file
  73. install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  74. install -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "doc/eula"
  75. }
RAW Paste Data