void-packages/srcpkgs/calibre/template
2020-08-03 09:49:01 -04:00

66 lines
2.2 KiB
Bash

# Template file for 'calibre'
pkgname=calibre
version=4.22.0
revision=1
build_style=python2-module
pycompile_dirs="/usr/lib/calibre/"
hostmakedepends="pkg-config python-BeautifulSoup4 python-Pillow python-PyQt5-svg
python-PyQt5-webengine python-apsw python-css-parser python-dateutil
python-devel python-html5-parser python-msgpack python-regex qt5-qmake
xdg-utils rapydscript-ng"
makedepends="glib-devel libchmlib-devel libinput-devel libmagick-devel libmtp-devel
libpodofo-devel libwmf-devel libxkbcommon-devel python-PyQt5-devel
qt5-devel sqlite-devel tslib-devel hunspell-devel hyphen-devel"
depends="desktop-file-utils optipng poppler-utils python-BeautifulSoup4
python-Markdown python-Pillow python-PyQt5-svg
python-PyQt5-webengine python-PyQt5-webchannel python-Pygments python-apsw
python-css-parser python-cssselect python-dateutil python-dbus
python-dnspython python-feedparser python-html5-parser python-mechanize
python-msgpack python-netifaces python-psutil python-regex python-html2text
qt5-webengine python-ipaddress"
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=51f52b7015c4d9b456d0d5e8efacfffe564709552f0a635ae8174d1947ab1c34
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() {
python2 setup.py build
python2 setup.py gui
python2 setup.py rapydscript
}
do_check() {
# qt test crashes without any error messages
# disabled for now
python2 setup.py test \
--exclude-test-name unrar \
--exclude-test-name qt
}
do_install() {
vmkdir usr/share/zsh/site-functions
python2 setup.py \
install --prefix=/usr --staging-root=${DESTDIR}/usr
for m in man-pages/man1/*.1; do
vman "${m}"
done
}