PKGBUILDs/community/sigil/PKGBUILD

80 lines
3.1 KiB
Bash
Raw Normal View History

2018-01-09 01:13:27 +00:00
# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Maintainer: Alad Wenter <alad@mailbox.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
2015-05-20 00:53:47 +00:00
# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - depend on xerces-c to avoid x86isms in bundled version
pkgname=sigil
2019-08-11 20:30:40 +00:00
pkgver=0.9.17
pkgrel=1
2015-05-20 00:53:47 +00:00
pkgdesc="WYSIWYG ebook editor"
2018-01-09 01:13:27 +00:00
arch=('x86_64')
url="https://sigil-ebook.com/"
2015-05-20 00:53:47 +00:00
license=('GPL3')
2019-03-21 03:49:13 +00:00
depends=('hicolor-icon-theme' 'hunspell' 'mathjax' 'minizip' 'python-css-parser'
2019-07-21 20:22:57 +00:00
'python-lxml' 'qt5-webengine' 'xerces-c')
makedepends=('qt5-tools' 'cmake')
2019-06-11 12:36:39 +00:00
optdepends=('hunspell-en_US: for English dictionary support'
2018-01-09 01:13:27 +00:00
'hyphen-en: for English hyphenation support in plugins'
2019-07-21 20:22:57 +00:00
'pageedit: external editor to replace BookView'
2018-01-09 01:13:27 +00:00
'python-html5lib: recommended for plugins'
'python-chardet: recommended for plugins'
'python-cssselect: recommended for plugins'
'python-pillow: recommended for plugins'
2018-07-29 11:22:08 +00:00
'python-regex: recommended for plugins'
'python-pyqt5: recommended for plugins'
'tk: recommended for plugins')
2019-03-21 03:49:13 +00:00
install=${pkgname}.install
2018-01-09 01:13:27 +00:00
source=("Sigil-${pkgver}.tar.gz::https://github.com/Sigil-Ebook/Sigil/archive/${pkgver}.tar.gz"
2019-08-11 20:30:40 +00:00
"https://github.com/Sigil-Ebook/Sigil/releases/download/${pkgver}/Sigil-${pkgver}.tar.gz.sig")
sha256sums=('25ef68f979c3daca9b2a869a5ca3919b0a0f965ae2ba176f34ff93a641c3e2b2'
'SKIP')
b2sums=('fdba78eb1167e97c4190d7ae6d8d6de8055e0cac0e1105a3bdc1ddacbfa2f8403a293018ec464c72b8024f1ef0c1e9b230ca90586fdbb1d2fb3826e0fd327137'
'SKIP')
2018-01-09 01:13:27 +00:00
validpgpkeys=('B5A56206AB0FBC1A24EFAB8AA166D29A8FCDAC63') # Doug Massay <douglaslmassay@gmail.com>
2015-05-20 00:53:47 +00:00
2019-02-19 03:32:56 +00:00
prepare() {
cd "${srcdir}"/Sigil-${pkgver}
# devendor css_parser as it's a direct copy of the external package;
# upstream maintains both and plans to switch soon
rm -r src/Resource_Files/plugin_launchers/python/css_parser/
}
2015-05-20 00:53:47 +00:00
2019-02-19 03:32:56 +00:00
build() {
mkdir -p "${srcdir}"/Sigil-${pkgver}/build
cd "${srcdir}"/Sigil-${pkgver}/build
2015-05-20 00:53:47 +00:00
2018-01-09 01:13:27 +00:00
cmake -G "Unix Makefiles" \
-DUSE_SYSTEM_LIBS=1 \
-DSYSTEM_LIBS_REQUIRED=1 \
-DINSTALL_BUNDLED_DICTS=0 \
2019-03-21 03:49:13 +00:00
-DMATHJAX_DIR=/usr/share/mathjax \
2018-01-09 01:13:27 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
2019-06-11 12:36:39 +00:00
-DCMAKE_INSTALL_LIBDIR=lib \
2018-01-09 01:13:27 +00:00
-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON ..
2015-05-20 00:53:47 +00:00
2018-01-09 01:13:27 +00:00
make
2015-05-20 00:53:47 +00:00
}
package() {
2018-01-09 01:13:27 +00:00
cd "${srcdir}"/Sigil-${pkgver}/build
make install DESTDIR="${pkgdir}"
for _pic in 16 32 48 128 256; do
install -D -m 0644 ../src/Resource_Files/icon/app_icon_${_pic}.png \
"${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/${pkgname}.png
done
install -Dm644 ../src/Resource_Files/icon/app_icon_128.png \
"$pkgdir/usr/share/pixmaps/$pkgname.png"
# Compile python bytecode
python -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
python -O -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
2015-05-20 00:53:47 +00:00
}