1 # Copyright 2023-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop unpacker xdg
7 DESCRIPTION
="Document Viewer for CAJ, KDH, NH, TEB and PDF format"
9 HOMEPAGE
="http://cajviewer.cnki.net"
10 SRC_URI
="https://download.cnki.net/cajPackage/CAJLinuxPackage/${PN}_${PV}_amd64.deb"
13 LICENSE
="CAJVIEWER-EULA"
16 RESTRICT
="mirror strip"
21 dev-qt/qtdeclarative:5
22 dev-qt/qtvirtualkeyboard:5
23 media-libs/tiff-compat:4
27 MY_PREFIX
="/opt/${PN}"
30 /opt/cajviewer/lib/*.so*
31 /opt/cajviewer/plugins/*/*.so
32 /opt/cajviewer/libexec/QtWebEngineProcess
37 doins
-r "./${MY_PREFIX}"
39 fperms
+x
"${MY_PREFIX}/bin/start.sh"
40 fperms
+x
"${MY_PREFIX}/bin/CAJViewer"
41 fperms
+x
"${MY_PREFIX}/libexec/QtWebEngineProcess"
43 domenu
"./usr/share/applications/cajviewer.desktop"
45 for size
in 16 22 24 32 48 64 128; do
46 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-teb.png
47 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-pdf.png
48 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-nh.png
49 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-kdh.png
50 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-epub.png
51 doicon
-s ${size} -c mimetypes ./usr/share/icons/hicolor/${size}x${size}/mimetypes
/application-caj.png
54 insinto
"/usr/share/mime/packages/"
55 doins
"./usr/share/mime/packages/cnki-caj.xml"