Date: Sunday, April 9, 2023 @ 18:45:10
Author: felixonmars
Revision: 1443439
archrelease: copy trunk to community-staging-x86_64
Added:
calibre/repos/community-staging-x86_64/
calibre/repos/community-staging-x86_64/PKGBUILD
(from rev 1443437, calibre/trunk/PKGBUILD)
calibre/repos/community-staging-x86_64/keys/
----------+
PKGBUILD | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
Copied: calibre/repos/community-staging-x86_64/PKGBUILD (from rev 1443437,
calibre/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-09 18:45:10 UTC (rev 1443439)
@@ -0,0 +1,136 @@
+# Maintainer: Caleb Maclennan <[email protected]>
+# Contributor: Jelle van der Waa <[email protected]>
+# Contributor: Eli Schwartz <[email protected]>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Giovanni Scafora <[email protected]>
+# Contributor: Petrov Roman <[email protected]>
+# Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com>
+# Contributor: Larry Hajali <[email protected]>
+
+pkgname=calibre
+pkgver=6.15.1
+pkgrel=3
+pkgdesc='Ebook management application'
+arch=(x86_64)
+url=https://calibre-ebook.com
+license=(GPL3)
+_pydeps=(apsw
+ beautifulsoup4
+ cchardet
+ css-parser
+ cssselect
+ dateutil
+ dnspython
+ feedparser
+ html2text
+ html5-parser
+ jeepney
+ lxml
+ markdown
+ mechanize
+ msgpack
+ netifaces
+ pdftotext
+ pillow
+ psutil
+ py7zr
+ pychm
+ pycryptodome
+ pygments
+ pyqt6
+ pyqt6-webengine
+ regex
+ unrardll
+ zeroconf)
+depends=(hunspell
+ hyphen
+ icu
+ jxrlib
+ libmtp
+ libstemmer
+ libusb
+ libwmf
+ mathjax
+ mtdev
+ optipng
+ podofo
+ "${_pydeps[@]/#/python-}"
+ qt6-imageformats
+ qt6-svg
+ qt6-webengine
+ ttf-liberation
+ uchardet
+ udisks2)
+makedepends=(cmake
+ pyqt-builder
+ rapydscript-ng
+ sip
+ xdg-utils)
+optdepends=('poppler: required for converting pdf to html'
+ 'speech-dispatcher: TTS support in the viewer')
+conflicts=(calibre-common
+ calibre-python3)
+replaces=("${conflicts[@]}")
+_archive="$pkgname-$pkgver"
+source=("https://download.calibre-ebook.com/$pkgver/$_archive.tar.xz"
+ "$url/signatures/$_archive.tar.xz.sig")
+sha256sums=('b7d7c6d610654260e1d22e5ecc1a2a93d0bda2588d345d2978a0f3d581fb441a'
+ 'SKIP')
+validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New
longer key) <[email protected]>
+
+prepare(){
+ cd "$_archive"
+
+ # Desktop integration (e.g. enforce arch defaults)
+ # Use uppercase naming scheme, don't delete config files under fakeroot.
+ sed -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" \
+ -i src/calibre/linux.py
+
+ # Remove unneeded files
+ rm -f resources/$pkgname-portable.*
+}
+
+build() {
+ cd "$_archive"
+ export LANG='en_US.UTF-8'
+ python setup.py build
+ python setup.py iso639
+ python setup.py iso3166
+ python setup.py liberation_fonts --system-liberation_fonts
--path-to-liberation_fonts /usr/share/fonts/liberation
+ python setup.py mathjax --system-mathjax --path-to-mathjax
/usr/share/mathjax
+ python setup.py gui
+}
+
+check() {
+ cd "$_archive"
+ export LANG='en_US.UTF-8'
+ python -m unittest discover
+}
+
+package() {
+ cd "$_archive"
+ export LANG='en_US.UTF-8'
+
+ # If this directory doesn't exist, zsh completion won't install.
+ install -d "${pkgdir}/usr/share/zsh/site-functions"
+
+ python setup.py install \
+ --staging-root="${pkgdir}/usr" \
+ --prefix=/usr \
+ --system-plugins-location=/usr/share/calibre/system-plugins
+
+ cp -a man-pages/ "${pkgdir}/usr/share/man"
+
+ # not needed at runtime
+ rm -r "${pkgdir}"/usr/share/calibre/rapydscript/
+
+ # Compiling bytecode FS#33392
+ # This is kind of ugly but removes traces of the build root.
+ while read -rd '' _file; do
+ _destdir="$(dirname "${_file#${pkgdir}}")"
+ python -m compileall -d "${_destdir}" "${_file}"
+ python -O -m compileall -d "${_destdir}" "${_file}"
+ done < <(find "${pkgdir}"/usr/lib/ -name '*.py' -print0)
+}