void-packages/srcpkgs/calibre/template
jkoderu-git 93cc1d221a calibre: update to 5.3.0
Closes: #25738 [via git-merge-pr]
2020-10-20 12:26:02 -04:00

69 lines
2.4 KiB
Bash

# Template file for 'calibre'
pkgname=calibre
version=5.3.0
revision=1
build_style=python3-module
pycompile_dirs="/usr/lib/calibre/"
hostmakedepends="pkg-config python3-BeautifulSoup4 python3-Pillow python3-PyQt5-svg
python3-PyQt5-webengine python3-apsw python3-css-parser python3-dateutil
python3-devel python3-html5-parser python3-msgpack python3-regex qt5-qmake
libpodofo-devel python3-PyQt-builder python3-PyQt5-devel qt5-host-tools
python3-zeroconf xdg-utils rapydscript-ng"
makedepends="libinput-devel libmagick-devel libmtp-devel
libpodofo-devel libwmf-devel libxkbcommon-devel python3-PyQt5-devel
qt5-devel sqlite-devel tslib-devel hunspell-devel hyphen-devel"
depends="desktop-file-utils optipng poppler-utils python3-BeautifulSoup4
python3-Markdown python3-Pillow python3-PyQt5-svg python3-zeroconf
python3-PyQt5-webengine python3-PyQt5-webchannel python3-Pygments python3-apsw
python3-css-parser python3-cssselect python3-dateutil python3-dbus
python3-dnspython python3-feedparser python3-html5-parser python3-mechanize
python3-msgpack python3-netifaces python3-psutil python3-regex python3-html2text
python3-pychm qt5-webengine"
checkdepends="${depends} libjpeg-turbo-tools jxrlib"
short_desc="Ebook management application"
maintainer="skmpz <dem.procopiou@gmail.com>"
license="GPL-3.0-only"
homepage="https://calibre-ebook.com"
changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.yaml"
distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
checksum=2ffc3b6cb5041ab890b684477e9e7a1b07a6f03d107f3eac3836c41fbe00b2e8
lib32disabled=yes
nocross=yes
do_configure() {
# Remove unneeded files and libs
rm -rf resources/${pkgname}-portable.* \
src/biplist
# Desktop integration (e.g. enforce arch defaults)
vsed -i src/calibre/linux.py \
-e "/import config_dir/,/os.rmdir(config_dir)/d" \
-e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
-e "s/^Name=calibre/Name=Calibre/g"
}
do_build() {
python3 setup.py build
python3 setup.py gui
python3 setup.py rapydscript
}
do_check() {
# qt test crashes without any error messages
# disabled for now
# unrar test fails because python3-unrardll isn't packaged
python3 setup.py test \
--exclude-test-name unrar \
--exclude-test-name qt
}
do_install() {
vmkdir usr/share/zsh/site-functions
python3 setup.py \
install --prefix=/usr --staging-root=${DESTDIR}/usr
for m in man-pages/man1/*.1; do
vman "${m}"
done
}