Commit 67905463 authored by Jeff Huang's avatar Jeff Huang 🤔

[skip-ci] calibre: update to 3.42.0

parent 90a37005
Pipeline #3396 skipped
pkgname=calibre pkgname=calibre
pkgver=3.41.3 pkgver=3.42.0
pkgrel=1 pkgrel=1
pkgdesc="Ebook management application" pkgdesc="Ebook management application"
arch=('x86_64') arch=('x86_64')
url="https://calibre-ebook.com/" url="https://calibre-ebook.com/"
license=('GPL3') license=('GPL3')
depends=('python2-six' 'python2-dateutil' 'python2-css-parser' 'python2-dukpy' _py_deps=('apsw' 'beautifulsoup4' 'cssselect' 'css-parser' 'dateutil' 'dbus' 'dnspython' 'dukpy'
'python2-mechanize' 'podofo' 'libwmf' 'jxrlib' 'html2text' 'html5-parser' 'lxml' 'markdown' 'mechanize' 'msgpack'
'chmlib' 'python2-lxml' 'libusb' 'python2-html5-parser' 'netifaces' 'unrardll' 'pillow' 'psutil' 'pygments' 'pyqt5' 'regex' 'enum34')
'python2-pillow' 'shared-mime-info' 'python2-dnspython' 'python2-msgpack' depends=('chmlib' 'icu' 'jxrlib' 'libmtp' 'libusbx' 'libwmf' 'mathjax' 'mtdev' 'optipng'
'python2-pyqt5' 'python2-psutil' 'icu' 'libmtp' 'python2-dbus' 'podofo' "${_py_deps[@]/#/python2-}" 'qt5-svg' 'qt5-webkit' 'udisks2')
'python2-netifaces' 'python2-cssselect' 'python2-apsw' 'qt5-webkit'
'qt5-svg' 'python2-regex' 'python2-pygments' 'mtdev' 'python2-unrardll'
'desktop-file-utils' 'gtk-update-icon-cache' 'optipng' 'udisks2' 'python2-enum34')
makedepends=('qt5-x11extras' 'sip' 'xdg-utils') makedepends=('qt5-x11extras' 'sip' 'xdg-utils')
optdepends=('ipython2: to use calibre-debug' optdepends=('ipython2: to use calibre-debug'
'poppler: required for converting pdf to html' 'poppler: required for converting pdf to html'
'kdialog: to use native dialog') 'kdialog: to use native dialog')
source=("https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz" source=("https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz"
"https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig") "https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig")
sha256sums=('2aa3a819915ea2a4ef032918cf545f2cc21ea3aad84ffc9cb772d6c8c986f098' sha256sums=('b51194aecd452e6cea9681889cd1b2f868d379b07413b1dcb8842c363487ad7a'
'SKIP') 'SKIP')
validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) <kovid@kovidgoyal.net> validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) <kovid@kovidgoyal.net>
prepare(){ prepare(){
cd "${pkgname}-${pkgver}" cd "${pkgname}-${pkgver}"
# Remove unneeded files
rm -rf resources/${pkgname}-portable.*
# Desktop integration (e.g. enforce arch defaults) # Desktop integration (e.g. enforce arch defaults)
sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \ sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
-e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \ -e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \
...@@ -36,6 +30,22 @@ prepare(){ ...@@ -36,6 +30,22 @@ prepare(){
-e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \ -e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
-e "s/^Name=calibre/Name=Calibre/g" \ -e "s/^Name=calibre/Name=Calibre/g" \
-i src/calibre/linux.py -i src/calibre/linux.py
# cherry-picked bits of python2-backports.functools_lru_cache
# needed for frozen builds + beautifulsoup4
# see https://github.com/kovidgoyal/calibre/commit/b177f0a1096b4fdabd8772dd9edc66662a69e683#commitcomment-33169700
rm -r src/backports
cd resources
# Remove unneeded files
rm ${pkgname}-portable.* mozilla-ca-certs.pem
# tarball cache from calibre 4.x
rm editor.js viewer.{js,html}
# use system mathjax
rm -r mathjax
} }
build() { build() {
...@@ -43,6 +53,8 @@ build() { ...@@ -43,6 +53,8 @@ build() {
LANG='en_US.UTF-8' python2 setup.py build LANG='en_US.UTF-8' python2 setup.py build
LANG='en_US.UTF-8' python2 setup.py gui LANG='en_US.UTF-8' python2 setup.py gui
LANG='en_US.UTF-8' python2 setup.py mathjax --path-to-mathjax /usr/share/mathjax --system-mathjax
LANG='en_US.UTF-8' python2 setup.py rapydscript
} }
package() { package() {
...@@ -59,6 +71,9 @@ package() { ...@@ -59,6 +71,9 @@ package() {
cp -a man-pages/ "${pkgdir}/usr/share/man" cp -a man-pages/ "${pkgdir}/usr/share/man"
# not needed at runtime
rm -r "${pkgdir}"/usr/share/calibre/rapydscript/
# Compiling bytecode FS#33392 # Compiling bytecode FS#33392
# This is kind of ugly but removes traces of the build root. # This is kind of ugly but removes traces of the build root.
while read -rd '' _file; do while read -rd '' _file; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment