summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43df9f8283f7dada7bfdf07f3944c5b64d109db2 (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
68
69
# Maintainer: yjun <jerrysteve1101 at gmail dot com>
# Contributor: swordfeng <swordfeng123@gmail.com>
# Contributor: TheGoliath <hidden>

pkgname=cajviewer
pkgver=9.0
pkgrel=2
pkgdesc="CAJViewer for Linux. Document Viewer for TEB, CAJ, NH, KDH and PDF format"
arch=('x86_64')
url="http://cajviewer.cnki.net/"
license=('custom')
depends=(
        'glibc'
        'gcc-libs'
        'bash'
        'hicolor-icon-theme'
#        'qt5-base'
#        'libcups'
#        'openssl-1.1'
#        'qt5-webchannel'
#        'qt5-webengine'
)
source_x86_64=("https://download.cnki.net/${pkgname}_${pkgver}_amd64.deb")

# strip will cause cajviewer core dumped 
options=('!strip')
sha256sums_x86_64=('3142c633d74dcf34ebaca9b7653f88ad3619f0b7a6cb689487b6cc583ec926d3')

_install() {
  find ${@: 2} -type f,l -exec install -Dm$1 {} ${pkgdir}/{} \;
}

prepare() {
  cd ${srcdir}

  install -dm755 build
  tar -xf data.* -C build
}

package() {
  cd "$srcdir/build"
  
  _install 644 opt/${pkgname}/bin
  _install 644 opt/${pkgname}/doc/
  # _install 644 opt/${pkgname}/lib -name "libreaderex_x64.so"
  _install 644 opt/${pkgname}/lib/
  _install 644 opt/${pkgname}/libexec/
  _install 644 opt/${pkgname}/plugins/
  _install 644 opt/${pkgname}/resources/
  _install 644 opt/${pkgname}/translations/
  _install 644 opt/${pkgname}/${pkgname}.png
  _install 644 opt/${pkgname}/VERSION
  
  for _exe in backgroundprocess CAJViewer start.sh
  do
    chmod 0755 ${pkgdir}/opt/${pkgname}/bin/${_exe}
  done
  chmod 0755 ${pkgdir}/opt/${pkgname}/libexec/QtWebEngineProcess
  install -dm755 ${pkgdir}/usr/bin/
  ln -s /opt/${pkgname}/bin/start.sh ${pkgdir}/usr/bin/${pkgname}


  # mime
  _install 644 usr/share/mime/
  _install 644 usr/share/icons/
  _install 644 usr/share/applications/
}

# vim: set sw=2 ts=2 et: