52 lines
2 KiB
Bash
52 lines
2 KiB
Bash
# Template file for 'calibre'
|
|
pkgname=calibre
|
|
version=2.82.0
|
|
revision=2
|
|
hostmakedepends="qt5-qmake python-devel pkg-config
|
|
python-dateutil python-lxml python-Pillow
|
|
python-PyQt5-webkit python-apsw python-cssutils python-CherryPy
|
|
python-html5lib"
|
|
makedepends="python-PyQt5-devel glib-devel libwmf-devel
|
|
fontconfig-devel libmagick-devel libressl-devel icu-devel sqlite-devel
|
|
libchmlib-devel libpodofo-devel qt5-devel libusb-devel libmtp-devel
|
|
libinput-devel libxkbcommon-devel tslib-devel"
|
|
depends="python-six python-dateutil python-cssutils python-CherryPy
|
|
python-Pillow python-dnspython python-PyQt5 python-PyQt5-svg
|
|
python-PyQt5-webkit python-psutil python-dbus python-netifaces
|
|
python-cssselect python-apsw qt5-webkit qt5-svg python-chardet python-html5lib
|
|
python-Pygments python-mechanize python-lxml
|
|
shared-mime-info desktop-file-utils gtk-update-icon-cache optipng"
|
|
short_desc="Ebook management application"
|
|
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|
license="GPL-3"
|
|
homepage="https://calibre-ebook.com"
|
|
distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
|
|
checksum=137995abe467fcb951c1d42583305ebec7b8ca403c44895e70f82a2d6156711c
|
|
|
|
nocross=yes
|
|
pycompile_dirs="/usr/lib/calibre/"
|
|
|
|
do_configure() {
|
|
# Remove unneeded files and libs
|
|
rm -rf resources/${pkgname}-portable.* \
|
|
src/cherrypy \
|
|
src/html5lib \
|
|
src/chardet
|
|
|
|
# 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
|
|
}
|
|
do_build() {
|
|
python2 setup.py build gui
|
|
}
|
|
do_install() {
|
|
vinstall ${FILESDIR}/calibre.desktop 644 usr/share/applications
|
|
vinstall ${FILESDIR}/calibre-viewer.desktop 644 usr/share/applications
|
|
python2 setup.py \
|
|
install --prefix=/usr --staging-root=${DESTDIR}/usr ${make_install_args}
|
|
}
|