summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD31
2 files changed, 46 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4387945023f5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = cajviewer-appimage
+ pkgdesc = CAJViewer for Linux
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = http://cajviewer.cnki.net
+ arch = x86_64
+ provides = cajviewer
+ conflicts = cajviewer
+ noextract = CAJViewer-x86_64-libc-2.24.AppImage
+ options = !strip
+ source = http://viewer.d.cnki.net/CAJViewer-x86_64-libc-2.24.AppImage
+ sha256sums = 2ee4ca35cc031ebdc413bcb46d63bb1b7f720c7a9db45641e25614f589f4933f
+
+pkgname = cajviewer-appimage
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a44e239df433
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: vvxxp8 <concatenate[g] the characters[x] in square[b] brackets[1] in[5] order[3] at gmail dot com>
+
+pkgname=cajviewer-appimage
+_installdir=/opt/${pkgname}
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="CAJViewer for Linux"
+arch=("x86_64")
+url="http://cajviewer.cnki.net"
+noextract=("CAJViewer-x86_64-libc-2.24.AppImage")
+options=("!strip")
+provides=('cajviewer')
+conflicts=('cajviewer')
+_pkgname="CAJViewer-x86_64-libc-2.24.AppImage"
+source=("http://viewer.d.cnki.net/CAJViewer-x86_64-libc-2.24.AppImage")
+sha256sums=("2ee4ca35cc031ebdc413bcb46d63bb1b7f720c7a9db45641e25614f589f4933f")
+
+prepare() {
+ cd "${srcdir}"
+ chmod a+x "${_pkgname}"
+ ${srcdir}/${_pkgname} --appimage-extract
+ sed -i "s+Exec=cajviewer+Exec=env DESKTOPINTEGRATION=yes ${_installdir}/${_pkgname} %U+" "squashfs-root/cajviewer.desktop"
+ find "squashfs-root/usr/share/icons/hicolor" -type d -exec chmod 755 {} \;
+}
+
+package() {
+ install -dm755 "${pkgdir}/usr/share/icons"
+ install -Dm755 "${_pkgname}" "${pkgdir}/${_installdir}/${_pkgname}"
+ install -Dm644 "squashfs-root/cajviewer.desktop" "${pkgdir}/usr/share/applications/cajviewer.desktop"
+ cp -R "squashfs-root/usr/share/icons/hicolor" "${pkgdir}/usr/share/icons"
+}