2016-02-04 15:38:07 +01:00
|
|
|
# Template file for 'calibre'
|
|
|
|
pkgname=calibre
|
2016-04-01 09:40:47 +02:00
|
|
|
version=2.54.0
|
|
|
|
revision=1
|
2016-02-04 15:38:07 +01:00
|
|
|
build_style=python-module
|
|
|
|
hostmakedepends="python pkg-config python-dateutil python-lxml python-Pillow
|
|
|
|
python-PyQt5-webkit python-apsw python-cssutils"
|
|
|
|
makedepends="python-devel qt5-qmake python-PyQt5-devel glib-devel
|
|
|
|
fontconfig-devel libmagick-devel libressl-devel icu-devel sqlite-devel
|
2016-02-13 23:56:52 +01:00
|
|
|
libchmlib-devel libpodofo-devel qt5-devel libusb-devel libmtp-devel
|
2016-02-04 15:38:07 +01:00
|
|
|
libinput-devel libxkbcommon-devel"
|
|
|
|
depends="python-six python-dateutil python-cssutils python-CherryPy
|
|
|
|
python-mechanize podofo libwmf ImageMagick chmlib python-lxml libusb
|
|
|
|
python-Pillow shared-mime-info python-dnspython python-PyQt5 python-PyQt5-webkit
|
|
|
|
python-psutil icu libmtp python-dbus python-netifaces python-cssselect
|
|
|
|
python-apsw qt5-webkit qt5-svg python-chardet python-html5lib python-Pygments
|
|
|
|
mtdev desktop-file-utils gtk-update-icon-cache optipng"
|
|
|
|
short_desc="Ebook management application"
|
|
|
|
make_build_args="build gui"
|
|
|
|
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
|
|
|
license="GPL-3"
|
|
|
|
homepage="https://calibre-ebook.com"
|
|
|
|
nocross=yes
|
|
|
|
distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
|
2016-04-01 09:40:47 +02:00
|
|
|
checksum=e9e0d8e05d298a555e66b628e0d6be3f45543e457f20c1d70ba55b1cb1ed4ce4
|
2016-02-04 15:38:07 +01:00
|
|
|
|
|
|
|
pycompile_version="2.7"
|
|
|
|
pycompile_dirs="/usr/lib/calibre/"
|
|
|
|
|
|
|
|
pre_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 ${make_build_args}
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_install() {
|
|
|
|
install -d "${pkgdir}/usr/share/zsh/site-functions" \
|
|
|
|
"${pkgdir}"/usr/share/{applications,desktop-directories,icons/hicolor}
|
|
|
|
|
|
|
|
install -Dm644 resources/calibre-mimetypes.xml \
|
|
|
|
"${pkgdir}/usr/share/mime/packages/calibre-mimetypes.xml"
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
python${pyver} setup.py \
|
|
|
|
install --prefix=/usr --staging-root=${DESTDIR}/usr ${make_install_args}
|
|
|
|
}
|