PKGBUILD 3.0 KB

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