mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
79 lines
3.1 KiB
Bash
79 lines
3.1 KiB
Bash
# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
|
|
# Maintainer: Alad Wenter <alad@mailbox.org>
|
|
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
|
|
# 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
|
|
pkgver=0.9.16
|
|
pkgrel=1
|
|
pkgdesc="WYSIWYG ebook editor"
|
|
arch=('x86_64')
|
|
url="https://sigil-ebook.com/"
|
|
license=('GPL3')
|
|
depends=('hicolor-icon-theme' 'hunspell' 'mathjax' 'minizip' 'python-css-parser'
|
|
'python-lxml' 'qt5-webengine' 'xerces-c')
|
|
makedepends=('qt5-tools' 'cmake')
|
|
optdepends=('hunspell-en_US: for English dictionary support'
|
|
'hyphen-en: for English hyphenation support in plugins'
|
|
'pageedit: external editor to replace BookView'
|
|
'python-html5lib: recommended for plugins'
|
|
'python-chardet: recommended for plugins'
|
|
'python-cssselect: recommended for plugins'
|
|
'python-pillow: recommended for plugins'
|
|
'python-regex: recommended for plugins'
|
|
'python-pyqt5: recommended for plugins'
|
|
'tk: recommended for plugins')
|
|
install=${pkgname}.install
|
|
source=("Sigil-${pkgver}.tar.gz::https://github.com/Sigil-Ebook/Sigil/archive/${pkgver}.tar.gz"
|
|
"https://github.com/Sigil-Ebook/Sigil/releases/download/${pkgver}/Sigil-${pkgver}.tar.gz.sig")
|
|
sha256sums=('c28ec5230b9eb708fae795b69777e32eceee94ac26e3ea2838c74ef1e041f638'
|
|
'SKIP')
|
|
b2sums=('1e784768cfe98e08ac01f5a9c11ec8254f9a0211f69ee1eb479643cc83677f6fea43745bcb158ea178ac64eec87c2e0062e783af2fe7477e2e5e8faf4db24c46'
|
|
'SKIP')
|
|
validpgpkeys=('B5A56206AB0FBC1A24EFAB8AA166D29A8FCDAC63') # Doug Massay <douglaslmassay@gmail.com>
|
|
|
|
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/
|
|
}
|
|
|
|
build() {
|
|
mkdir -p "${srcdir}"/Sigil-${pkgver}/build
|
|
cd "${srcdir}"/Sigil-${pkgver}/build
|
|
|
|
cmake -G "Unix Makefiles" \
|
|
-DUSE_SYSTEM_LIBS=1 \
|
|
-DSYSTEM_LIBS_REQUIRED=1 \
|
|
-DINSTALL_BUNDLED_DICTS=0 \
|
|
-DMATHJAX_DIR=/usr/share/mathjax \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
|
|
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_SKIP_RPATH=ON ..
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
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}
|
|
}
|