summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorgxb1522020-04-16 18:13:08 +0800
committergxb1522020-04-16 18:13:08 +0800
commitbbd4aec700279879e1447b1a6bbc441442aa81d4 (patch)
treec356318bb1d16abfa87cb00c8af12588e540a58f /PKGBUILD
downloadaur-bbd4aec700279879e1447b1a6bbc441442aa81d4.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 31 insertions, 0 deletions
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"
+}