# Maintainer: Christian Schendel # Contributor: Alex Potapenko pkgname=calibre-bin pkgver=8.15.0 pkgrel=1 pkgdesc="Ebook management application" arch=( x86_64 ) url="https://download.calibre-ebook.com" license=( GPL-3.0-only ) provides=("${pkgname%-bin}") conflicts=( "${pkgname%-git}" "${pkgname-bin}" "${pkgname-git}" "${pkgname-prebuild}" ) options=('!strip') ## Sources ## Since there doesn't seem to be a simple way to generate desktop ## integration files without building calibre from source, ## we'll provide them here source=( share.tar.xz "${url}/${pkgver}/calibre-${pkgver}-x86_64.txz" ) b2sums=('07e59ad14b4bb5d69f9b887990ff3cde918ff571a45381cca4f846bdbfa6df65b7f5b5d56bcd8926b8787c8d7dd5fe562f6332f9d4a7027369d814cbea7dd5ee' 'a988cec06d71219bf7bafbc8708ce1add5b2b8838ea1cc06251c56b822948ea3626cb6d37056b5da613ccc3b9a0a57358b5a091a5853697ccb7d2572001dcc50') prepare() { # don't want the sources symlinks in the final tarball for src in "${source[@]##*/}"; do if [[ -L "${srcdir}/${src}" ]]; then rm "${srcdir}/${src}" fi done } package() { depends+=( alsa-lib bash brotli bzip2 chmlib dbus expat ffmpeg flite fontconfig freetype2 gcc-libs glib2 glibc hicolor-icon-theme hunspell hyphen jbigkit lcms2 libdeflate libdrm libffi libglvnd libgpg-error libice libinput libjpeg-turbo libmtp libpng libpulse libsm libstemmer libtiff libtirpc libunrar libusb libwebp libx11 libxcb libxcomposite libxcrypt-compat libxdamage libxext libxfixes libxkbcommon libxkbcommon-x11 libxkbfile libxml2 libxrandr libxslt libxtst mesa mtdev ncurses nspr nss openjpeg2 openssl pcre2 podofo poppler python qt6-base qt6-declarative qt6-multimedia qt6-positioning qt6-sensors qt6-speech qt6-svg qt6-wayland qt6-webchannel qt6-webengine readline sqlite systemd-libs uchardet util-linux-libs wayland xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xz zlib zstd ) ## Creating needed directories install -dm0755 "${pkgdir}/usr/bin" install -dm0755 "${pkgdir}/opt/calibre" ## Package calibre cp -af "${srcdir}/"* "${pkgdir}/opt/calibre" mv -f "${pkgdir}/opt/calibre/share" "${pkgdir}/usr" ## espeak-ng-data used by calibre install -dm755 "$pkgdir/opt/calibre/share" mv -f "$pkgdir/usr/share/espeak-ng-data" "$pkgdir/opt/calibre/share" chmod +rx "${pkgdir}/opt/calibre/resources/locales" ## Create symlinks in /usr/bin #shellcheck disable=SC2044 for f in $(find "${pkgdir}/opt/calibre" -maxdepth 1 -type f -printf "%f\n"); do ln -s "/opt/calibre/$f" "${pkgdir}/usr/bin/$f" done } # vim: set ts=4 sw=4 et: