PKGBUILD 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Maintainer: Eli Schwartz <eschwartz@archlinux.org>
  2. # Maintainer (Arch): Eli Schwartz <eschwartz@archlinux.org>
  3. # Maintainer (Arch): Alad Wenter <alad@mailbox.org>
  4. # Contributor: Giovanni Scafora <giovanni@archlinux.org>
  5. # Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>
  6. # parabola changes and rationale:
  7. # - freeze at version immediately before port to webengine,
  8. # see https://labs.parabola.nu/issues/2399
  9. pkgname=sigil
  10. pkgver=0.9.14
  11. pkgrel=2
  12. pkgrel+=par2
  13. pkgdesc="WYSIWYG ebook editor. Frozen to avoid qt5-webengine dependency."
  14. arch=('x86_64' 'i686' 'armv7h')
  15. url="https://sigil-ebook.com/"
  16. license=('GPL3')
  17. depends=('hicolor-icon-theme' 'hunspell' 'mathjax' 'minizip' 'python-css-parser'
  18. 'python-lxml' 'qt5-webkit')
  19. makedepends=('qt5-tools' 'qt5-svg' 'qt5-xmlpatterns' 'cmake')
  20. optdepends=('hunspell-en_US: for English dictionary support'
  21. 'hyphen-en: for English hyphenation support in plugins'
  22. 'python-html5lib: recommended for plugins'
  23. 'python-chardet: recommended for plugins'
  24. 'python-cssselect: recommended for plugins'
  25. 'python-pillow: recommended for plugins'
  26. 'python-regex: recommended for plugins'
  27. 'python-pyqt5: recommended for plugins'
  28. 'tk: recommended for plugins')
  29. install=${pkgname}.install
  30. source=("Sigil-${pkgver}.tar.gz::https://github.com/Sigil-Ebook/Sigil/archive/${pkgver}.tar.gz"
  31. "https://github.com/Sigil-Ebook/Sigil/releases/download/${pkgver}/Sigil-${pkgver}.tar.gz.sig")
  32. sha256sums=('6da5482a6158896c7cde50d7787b7d2c681ab3afea032298ccf05f50ec803ac4'
  33. 'SKIP')
  34. validpgpkeys=('B5A56206AB0FBC1A24EFAB8AA166D29A8FCDAC63') # Doug Massay <douglaslmassay@gmail.com>
  35. prepare() {
  36. cd "${srcdir}"/Sigil-${pkgver}
  37. # devendor css_parser as it's a direct copy of the external package;
  38. # upstream maintains both and plans to switch soon
  39. rm -r src/Resource_Files/plugin_launchers/python/css_parser/
  40. }
  41. build() {
  42. mkdir -p "${srcdir}"/Sigil-${pkgver}/build
  43. cd "${srcdir}"/Sigil-${pkgver}/build
  44. cmake -G "Unix Makefiles" \
  45. -DUSE_SYSTEM_LIBS=1 \
  46. -DSYSTEM_LIBS_REQUIRED=1 \
  47. -DINSTALL_BUNDLED_DICTS=0 \
  48. -DMATHJAX_DIR=/usr/share/mathjax \
  49. -DCMAKE_INSTALL_PREFIX=/usr \
  50. -DCMAKE_INSTALL_LIBDIR=lib \
  51. -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
  52. -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
  53. -DCMAKE_BUILD_TYPE=Release \
  54. -DCMAKE_SKIP_RPATH=ON ..
  55. make
  56. }
  57. package() {
  58. cd "${srcdir}"/Sigil-${pkgver}/build
  59. make install DESTDIR="${pkgdir}"
  60. for _pic in 16 32 48 128 256; do
  61. install -D -m 0644 ../src/Resource_Files/icon/app_icon_${_pic}.png \
  62. "${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/${pkgname}.png
  63. done
  64. install -Dm644 ../src/Resource_Files/icon/app_icon_128.png \
  65. "$pkgdir/usr/share/pixmaps/$pkgname.png"
  66. # Compile python bytecode
  67. python -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
  68. python -O -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
  69. }