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

calibre: update to 5.0.1 (but it requires python at 3.7.0...)

parent e0e94046
Pipeline #6967 skipped with stage
pkgdesc="Ebook management application"
......@@ -7,16 +7,15 @@ url=""
_py_deps=('apsw' 'beautifulsoup4' 'cssselect' 'css-parser' 'dateutil' 'dbus' 'dnspython' 'dukpy'
'html2text' 'html5-parser' 'lxml' 'markdown' 'mechanize' 'msgpack'
'netifaces' 'unrardll' 'pillow' 'psutil' 'pygments' 'pyqt5' 'regex' 'enum34')
'netifaces' 'unrardll' 'pillow' 'psutil' 'pygments' 'pyqt5' 'regex')
depends=('chmlib' 'icu' 'jxrlib' 'libmtp' 'libusbx' 'libwmf' 'mathjax' 'mtdev' 'optipng'
'podofo' "${_py_deps[@]/#/python2-}" 'qt5-svg' 'qt5-webengine' 'udisks2')
'podofo' "${_py_deps[@]/#/python3-}" 'qt5-svg' 'qt5-webengine' 'udisks2')
makedepends=('qt5-x11extras' 'sip' 'xdg-utils')
optdepends=('ipython2: to use calibre-debug'
'poppler: required for converting pdf to html'
optdepends=('poppler: required for converting pdf to html'
'kdialog: to use native dialog')
validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) <>
......@@ -29,19 +28,11 @@ prepare(){
-e "s/^Name=calibre/Name=Calibre/g" \
-i src/calibre/
# cherry-picked bits of python2-backports.functools_lru_cache
# needed for frozen builds + beautifulsoup4
# see
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
......@@ -49,10 +40,10 @@ prepare(){
build() {
cd "${pkgname}-${pkgver}"
LANG='en_US.UTF-8' python2 build
LANG='en_US.UTF-8' python2 gui
LANG='en_US.UTF-8' python2 mathjax --path-to-mathjax /usr/share/mathjax --system-mathjax
LANG='en_US.UTF-8' python2 rapydscript
LANG='en_US.UTF-8' python3 build
LANG='en_US.UTF-8' python3 gui
LANG='en_US.UTF-8' python3 mathjax --path-to-mathjax /usr/share/mathjax --system-mathjax
LANG='en_US.UTF-8' python3 rapydscript
package() {
......@@ -61,7 +52,7 @@ package() {
# If this directory doesn't exist, zsh completion won't install.
install -d "${pkgdir}/usr/share/zsh/site-functions"
LANG='en_US.UTF-8' python2 install \
LANG='en_US.UTF-8' python3 install \
--staging-root="${pkgdir}/usr" \
......@@ -74,7 +65,7 @@ package() {
# This is kind of ugly but removes traces of the build root.
while read -rd '' _file; do
_destdir="$(dirname "${_file#${pkgdir}}")"
python2 -m compileall -d "${_destdir}" "${_file}"
python2 -O -m compileall -d "${_destdir}" "${_file}"
python3 -m compileall -d "${_destdir}" "${_file}"
python3 -O -m compileall -d "${_destdir}" "${_file}"
done < <(find "${pkgdir}"/usr/lib/ -name '*.py' -print0)
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