# Maintainer: Christian Schendel # Contributor: Alex Potapenko pkgname=calibre-bin pkgver=8.10.0 pkgrel=2 pkgdesc="Ebook management application" arch=( x86_64 ) url="https://github.com/kovidgoyal/calibre" license=( GPL-3.0-only ) provides=( "calibre=$pkgver" ) conflicts=( calibre calibre-git ) options=( '!emptydirs' ) # 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/releases/download/v${pkgver}/calibre-${pkgver}-x86_64.txz" ) b2sums=('e4f5fae13053d05538c96d3be4ddb57bc5d98ecb365036a1afe4cf41e7c9e902ca039b4c7dbb7c1f8f45e53951633e98e1f36f29a192d0ea536067c7c6822512' '4baa625683b7e6ecb6ba043c4d68d131c13a6a83daf0dfe5de7a4f7aace9da35025f19af47d75394066bcd23bb16b7b69af38ca5c399455161741085c0211b68') 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 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 libxrandr libxslt libxtst mesa mtdev ncurses nspr nss openjpeg2 openssl pcre2 podofo 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 -dm755 "$pkgdir/usr/bin" install -dm755 "$pkgdir/opt/calibre" # Package calibre cp -af "$srcdir/"* "$pkgdir/opt/calibre" mv -f "$pkgdir/opt/calibre/share" "$pkgdir/usr" # 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 }