An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

# Maintainer: Nemo <archlinux at captnemo dot in>
# Based on upwork-appimage package on the AUR
#
# There's no central repository for AppImages, and no convention on
# system-wide AppImage installations, so we're picking /opt/appimages.
# We grab koreader.png and koreader.desktop from the AppImage, patch the koreader.desktop,
# and install them as we would other apps, for convenience sake.
pkgname=koreader-appimage
pkgver=2021.05
pkgrel=1
pkgdesc="An ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats."
arch=('x86_64')
depends=('zlib')
makedepends=('p7zip')
url="https://koreader.rocks/"
license=('AGPL3')
_filename="koreader-appimage-x86_64-linux-gnu-v$pkgver.AppImage"
noextract=("$_filename")
options=('!strip')
install=${pkgname}.install
source=("https://ota.koreader.rocks/koreader-appimage-x86_64-linux-gnu-v$pkgver.AppImage")
sha512sums=('1921f45e53e388a947c782e41e7cad3122a39342e5cb51b2ad103c48a66b6e088c02cd24c13d40e80dee2645828a6dd9b7d5d7678e36062d290bb645703af15a')
prepare() {
cd "${srcdir}"
mv "$_filename" "koreader.AppImage"
7z x "${srcdir}/koreader.AppImage" koreader.png
7z x "${srcdir}/koreader.AppImage" koreader.desktop
mkdir -p usr/share/pixmaps usr/share/applications opt/appimages
mv koreader.png usr/share/pixmaps
sed -i 's@Exec=.*@Exec=/opt/appimages/koreader.AppImage %u@' koreader.desktop
mv koreader.desktop usr/share/applications
cp koreader.AppImage opt/appimages/
}
package() {
cd "${srcdir}"
cp -rp usr "${pkgdir}/usr"
cp -rp opt "${pkgdir}/opt"
chmod +x "${pkgdir}/opt/appimages/koreader.AppImage"
}