# 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: André Silva # Contributor: Márcio Silva # Contributor: David P. # Maintainer: Jesús E. pkgname=calibre _commit=e3d96a82f7b4481b39fa778bceda9322865067f0 pkgver=3.2.1 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=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-cherrypy' 'python2-mechanize' 'podofo' 'libwmf' 'chmlib' 'python2-lxml' 'libusbx' 'python2-pillow' 'shared-mime-info' 'python2-dnspython' 'python2-pyqt5' 'python2-psutil' 'icu' 'libmtp' 'python2-dbus' 'python2-netifaces' 'python2-cssselect' 'python2-apsw' 'qt5-webkit' 'qt5-svg' 'python2-chardet' 'python2-msgpack' 'python2-regex' 'python2-pygments' 'mtdev' 'desktop-file-utils' 'gtk-update-icon-cache' 'optipng' '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=('4644205ef8ddcc068f39723515f17141d02f998261e82bc5e8a6a31db98e83894d3d357f4a59cc518ae498d57bb87aafd42c68756824f8f1bed0b63e9a1fe220' '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 # Compiling bytecode FS#33392 python2 -m compileall "${pkgdir}/usr/lib/calibre/" python2 -O -m compileall "${pkgdir}/usr/lib/calibre/" }