Advertisement
Guest User

Untitled

a guest
Dec 7th, 2021
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.17 KB | None | 0 0
  1. # Maintainer : djnk8 <djnk8@mailinator.com>
  2. set -e
  3.  
  4. HNCCONTEXT=opt/hnc/hoffice11/Bin/qt/plugins/platforminputcontexts
  5. NIMFLIB=libqt5im-nimf.so
  6. KIMELIB=libkime-qt-5.11.3.so
  7.  
  8. _host='Host: cdn.hancom.com'
  9. _referer='Referer: https://www.hancom.com/cs_center'
  10. DLAGENTS=("https::/usr/bin/curl -o %o -H ${_referer// /\\ } -H ${_host// /\\} %u")
  11.  
  12. pkgname='hoffice'
  13. pkgver=11.20.0.1520
  14. pkgrel=3
  15. pkgdesc='Office document editor for Linux. Hancom Office Editor is an application to allow you to edit office documents that is developed and distributed by Hancom Inc.'
  16. arch=('x86_64')
  17. source=(
  18.     'https://cdn.hancom.com/pds/hnc/DOWN/gooroom/hoffice_11.20.0.1520_amd64.deb'
  19.     'LICENSE'
  20. )
  21.  
  22. url='https://www.hancom.com/'
  23. license=('custom:hoffice')
  24. depends=('cairo' 'fontconfig' 'freetype2' 'gcc-libs' 'glibc' 'glu' 'harfbuzz' 'harfbuzz-icu' 'libcups' 'libcurl-gnutls' 'libxcb' 'qt5-base' 'qt5-x11extras' 'zlib')
  25. sha256sums=(
  26.     '1ecb2f82e915b49706d1f5f6d206f8bd4a9384fda2bd56798c94046865fe5730'
  27.     '09b74399a45cde2b28e672784dbd1eb6397454a025e05a51fb3367eadb834583'
  28. )
  29. post_install() {
  30.   xdg-icon-resource forceupdate --theme hicolor &> /dev/null
  31.   update-desktop-database -q
  32. }
  33. post_upgrade() {
  34.   post_install
  35. }
  36.  
  37. pre_remove() {
  38.   if [[ -f "/${HNCCONTEXT}/${NIMFLIB}" ]]; then
  39.     rm -vf "/${HNCCONTEXT}/${NIMFLIB}"
  40.   fi
  41. }
  42.  
  43. post_remove() {
  44.   xdg-icon-resource forceupdate --theme hicolor &> /dev/null
  45.   update-desktop-database -q
  46. }
  47. package() {
  48.     cd ${srcdir}/..
  49.     curl -fLO https://github.com/Riey/kime/releases/download/v2.5.5/libkime-qt-5.11.3.so
  50.     msg2 "Extracting package binaries(data.tar.xz)..."
  51.     bsdtar -xf ${srcdir}/data.tar.xz -C "${pkgdir}/"
  52.     install -Dm644 -t "${pkgdir}/usr/share/licenses/hoffice/LICENSE" "${srcdir}/LICENSE"
  53.  
  54.     if [[ -f '/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libqt5im-nimf.so' ]]; then
  55.         ln -sf "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/${NIMFLIB}" "${pkgdir}/${HNCCONTEXT}/${NIMFLIB}"
  56.     fi
  57.  
  58.    if [[ -f "${srcdir}/../${KIMELIB}" ]]; then
  59.     cp -f "${srcdir}/../${KIMELIB}" "${pkgdir}/${HNCCONTEXT}/${KIMELIB}"
  60.    fi
  61.  
  62.     msg2 "The error messages are from UTF-8 limitations. Please ignore it, as it does no harm."
  63. }
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement