upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / sigil / trunk / PKGBUILD
blobafdfbd2d88bba1f1eff65917f9671ff7e281dd99
1 # Maintainer: 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>
7 pkgname=sigil
8 pkgver=1.9.30
9 pkgrel=3
10 pkgdesc='multi-platform EPUB2/EPUB3 ebook editor'
11 arch=('x86_64')
12 url=https://sigil-ebook.com
13 _url=https://github.com/Sigil-Ebook/Sigil
14 license=(GPL3)
15 depends=(hicolor-icon-theme
16          hunspell
17          mathjax2
18          minizip
19          python-css-parser
20          python-dulwich
21          python-lxml
22          qt5-svg
23          qt5-webengine)
24 makedepends=(cmake
25              qt5-tools)
26 optdepends=('hunspell-en_US: for English dictionary support'
27             'hyphen-en: for English hyphenation support in plugins'
28             'pageedit: external editor to replace BookView'
29             'python-html5lib: recommended for plugins'
30             'python-chardet: recommended for plugins'
31             'python-cssselect: recommended for plugins'
32             'python-pillow: recommended for plugins'
33             'python-regex: recommended for plugins'
34             'python-pyqt5: recommended for plugins'
35             'python-pyqt5-webengine: recommended for plugins'
36             'tk: recommended for plugins')
37 _archive="${pkgname^}-$pkgver"
38 source=("$_url/archive/$pkgver/$_archive.tar.gz"
39         "$_url/releases/download/${pkgver}/$_archive.tar.gz.sig"
40         "$_url/commit/8e21405f5d2dfdc7da60f845ae7cf5e2bca6d029.patch") # FS77888
41 sha256sums=('262c43ec0ce9ea9486fc19074dd0a687a39d9df1829732e9006d8c5fbb242458'
42             'SKIP'
43             '96fcfa8bdc04d79cb76b05f0bf042e4612b132027486459e4f08c0e5b4d8c29a')
44 validpgpkeys=('B5A56206AB0FBC1A24EFAB8AA166D29A8FCDAC63') # Doug Massay <douglaslmassay@gmail.com>
46 prepare() {
47         cd "$_archive"
48         mkdir -p build
49         patch -p1 < "../${source[2]##*/}"
52 build() {
53         cd "$_archive/build"
54         cmake -G "Unix Makefiles" \
55                 -D USE_SYSTEM_LIBS=1 \
56                 -D SYSTEM_LIBS_REQUIRED=1 \
57                 -D INSTALL_BUNDLED_DICTS=0 \
58                 -D INSTALL_HICOLOR_ICONS=1 \
59                 -D DISABLE_UPDATE_CHECK=1 \
60                 -D MATHJAX_DIR=/usr/share/mathjax2 \
61                 -D CMAKE_INSTALL_PREFIX=/usr \
62                 -D CMAKE_INSTALL_LIBDIR=lib \
63                 -D CMAKE_C_FLAGS="$CFLAGS" \
64                 -D CMAKE_CXX_FLAGS="$CXXFLAGS" \
65                 -D CMAKE_SKIP_RPATH=ON ..
66         make
69 package() {
70         cd "$_archive/build"
71         make install DESTDIR="$pkgdir"
72         python -m compileall "$pkgdir/usr/share/sigil/"{plugin_launchers/python/,python3lib}
73         python -O -m compileall "$pkgdir/usr/share/sigil/"{plugin_launchers/python/,python3lib}