# Maintainer (Arch): Jelle van der Waa # Maintainer (Arch): Daniel Wallace # Contributor (Arch): Giovanni Scafora # Contributor (Arch): Petrov Roman # Contributor (Arch): Andrea Fagiani # Contributor (Arch): Larry Hajali # Contributor (Arch): Eli Schwartz # Contributor: David P. # Maintainer: Jesús E. pkgname=calibre _commit="3962610aa1f2a9789656a9ea26b0753ab0b129dc" pkgver=3.7.0 pkgrel=1.parabola1 pkgdesc="Ebook management application, without nonfree decompression engine for RAR archives" arch=('x86_64' 'i686' 'armv7h') url="https://calibre-ebook.com/" license=('GPL3') depends=('chmlib' 'desktop-file-utils' 'gtk-update-icon-cache' 'icu' 'libmtp' 'libusbx' 'libwmf' 'mtdev' 'optipng' 'podofo' 'python2-apsw' 'python2-chardet' 'python2-cssselect' 'python2-cssutils' 'python2-dateutil' 'python2-dbus' 'python2-dnspython' 'python2-dukpy' 'python2-html5-parser' 'python2-lxml' 'python2-mechanize' 'python2-msgpack' 'python2-netifaces' 'python2-pillow' 'python2-psutil' 'python2-pygments' 'python2-pyqt5' 'python2-regex' 'python2-six' 'qt5-svg' 'qt5-webkit' 'shared-mime-info' 'udisks2') makedepends=('qt5-x11extras' 'xdg-utils') optdepends=('ipython2: to use calibre-debug' 'poppler: required for converting pdf to html') replaces=($pkgname-libre) conflicts=($pkgname-libre) source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/Megver83/calibre/repository/archive.tar.gz?ref=$pkgver" "$pkgname-$pkgver.tar.gz.sig::https://gitlab.com/Megver83/calibre/raw/signatures/$pkgname-$pkgver-${_commit}.tar.gz.sig") sha512sums=('a8f5dc50d8419497edd74eb1f987f553455684a6eba22daa0a8b2b6b24fe3776a321f20b188b8609456397f79e43a5f0303b5987ede95a95ca277b982175a510' 'SKIP') validpgpkeys=('6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. '916FFBC76D2E641BA416BA53364F4E1483446AC5' # Jesús E. ) prepare() { mv "$pkgname-$pkgver-${_commit}" "$pkgname-$pkgver" cd "${pkgname}-${pkgver}" # Desktop integration (e.g. enforce arch defaults) sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \ -e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \ -e "/cc(\['xdg-mime', 'install', MIME\])/d" \ -e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \ -e "s/^Name=calibre/Name=Calibre/g" \ -i src/calibre/linux.py } build() { cd "${pkgname}-${pkgver}" LANG='en_US.UTF-8' python2 setup.py build LANG='en_US.UTF-8' python2 setup.py gui } package() { cd "${pkgname}-${pkgver}" install -d "${pkgdir}/usr/share/zsh/site-functions" \ "${pkgdir}"/usr/share/{applications,desktop-directories,icons/hicolor} install -Dm644 resources/calibre-mimetypes.xml \ "${pkgdir}/usr/share/mime/packages/calibre-mimetypes.xml" XDG_DATA_DIRS="${pkgdir}/usr/share" LANG='en_US.UTF-8' \ python2 setup.py install --staging-root="${pkgdir}/usr" --prefix=/usr cp -a man-pages/ "${pkgdir}/usr/share/man" # Compiling bytecode FS#33392 python2 -m compileall "${pkgdir}/usr/lib/calibre/" python2 -O -m compileall "${pkgdir}/usr/lib/calibre/" }