summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13f7410ffd7cd63e50e8d9fc3142f17b34bb543e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer : 00ein00 <Ein420@proton.me>

HNCCONTEXT=opt/hnc/hoffice11/Bin/qt/plugins/platforminputcontexts
NIMFLIB=libqt5im-nimf.so
KIMELIB=libkime-qt-5.11.3.so

_host='Host: cdn.hancom.com'
_referer='Referer: https://www.hancom.com/cs_center'
DLAGENTS=("https::/usr/bin/curl -# -o %o -H ${_referer// /\\ } -H ${_host// /\\} %u")

pkgname='hoffice-2022-beta'
pkgver=11.20.0.1520
pkgrel=4
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.'
arch=('x86_64')
source=(
  'https://download943.mediafire.com/23qptb6d8wwgdUTv4TEK0jj2Q3ImndvB4Gpo2MPELYbe1UeR-VgDHWvQR4uho05MDtCxjpoqrENH3D2JAk5Uqh2GootTnC6a17pBZVxHRivOb1HjRV2QE2_m1XMXJHbPkV1QuiOTOk7PdGxQcg7G5qt1iS2GZHI7REIay_rc_u2EbA/74beldrv8vkq3ga/1732118678_hoffice_11.20.0.1520_amd64.deb'
  'LICENSE'
  'libqt5im-nimf.so'
)

url='https://github.com/Ein420/hoffice-2022-beta/'

license=('custom:hoffice')

depends=('cairo' 'fontconfig' 'freetype2' 'gcc-libs' 'glibc' 'glu' 'harfbuzz' 'harfbuzz-icu' 'libcups' 'libcurl-gnutls' 'libxcb' 'openssl-1.1' 'qt5-base' 'qt5-x11extras' 'zlib')
provides=('hoffice-2022-beta=${pkgver}')
conflicts=('hoffice')

sha256sums=('1ecb2f82e915b49706d1f5f6d206f8bd4a9384fda2bd56798c94046865fe5730'
  '09b74399a45cde2b28e672784dbd1eb6397454a025e05a51fb3367eadb834583'
  'd246c02a20a1e4ea123f9c2275dfc4a2ea091a65032ddbbe8a59bfc71418f60c')

post_install() {
  xdg-icon-resource forceupdate --theme hicolor &>/dev/null
  update-desktop-database -q
}

post_upgrade() {
  post_install
}

pre_remove() {
  if [[ -f "/${HNCCONTEXT}/${NIMFLIB}" ]]; then
    rm -vf "/${HNCCONTEXT}/${NIMFLIB}"
  fi
}

post_remove() {
  xdg-icon-resource forceupdate --theme hicolor &>/dev/null
  update-desktop-database -q
}

package() {

  curl -# -o "${srcdir}/${KIMELIB}" -fL 'https://github.com/Riey/kime/releases/latest/download/libkime-qt-5.11.3.so'

  bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}/"

  install -Dm644 -t "${pkgdir}/usr/share/licenses/hoffice" "${srcdir}/LICENSE"

  if [ -f "${srcdir}/${KIMELIB}" ] && [ -f "${srcdir}/${NIMFLIB}" ]; then
    install -Dm755 -t "${pkgdir}/${HNCCONTEXT}" "${srcdir}/${KIMELIB}"
    install -Dm755 -t "${pkgdir}/${HNCCONTEXT}" "${srcdir}/${NIMFLIB}"
  fi

}