desktop/sigil/PKGBUILD

76 lines
2.7 KiB
Bash
Raw Normal View History

2011-01-09 22:14:51 +08:00
pkgname=sigil
_pkgname=Sigil
2016-08-06 03:13:47 +08:00
pkgver=0.9.6
2015-06-23 01:16:42 +08:00
pkgrel=1
2015-04-28 05:01:18 +08:00
pkgdesc="A multi-platform WYSIWYG ebook editor. It is designed to edit books in ePub format."
2012-12-28 03:47:24 +08:00
arch=('x86_64')
2015-04-28 05:01:18 +08:00
url="http://sigil-ebook.com/"
2011-01-09 22:14:51 +08:00
license=('GPL3')
2016-02-23 02:34:30 +08:00
depends=('qt5-webkit' 'python3' 'hicolor-icon-theme' 'python3-lxml>=3.5.0' 'python3-six')
makedepends=('qt5-tools' 'qt5-svg' 'cmake')
optdepends=('hunspell-en: for English dictionary support'
'hyphen-en: for English hyphenation support in plugins'
'python3-html5lib: recommended for plugins'
'python3-chardet: recommended for plugins'
'python3-cssselect: recommended for plugins'
'python3-cssutils: recommended for plugins'
'python3-pillow: recommended for plugins'
'python3-regex: recommended for plugins')
categories=('office')
2011-01-09 22:14:51 +08:00
install=sigil.install
2012-11-01 02:29:55 +08:00
screenshot=('http://1.bp.blogspot.com/-K2Q-tdVbPRI/UI08v7LhzHI/AAAAAAAAABY/vZ5LHjM6nb4/s1600/Screen+Shot+2012-10-28+at+10.07.03+AM.png')
2016-02-23 02:34:30 +08:00
source=("https://github.com/user-none/Sigil/releases/download/${pkgver}/${_pkgname}-${pkgver}-Code.zip"
"0001-Set-environment-variable-for-Sigil-dictionaries.patch")
2016-08-06 03:13:47 +08:00
sha256sums=('7856ad20116ef13fc3f79fa01c1d65c8b15ce1047f1e88b0723c2658cd8f18fd'
2016-02-23 02:34:30 +08:00
'8a1d6085c1ba2c2a919581096af20d0851a6a7a70c4c001a3d30881a511e52c6')
2012-11-01 02:29:55 +08:00
2016-02-23 02:34:30 +08:00
prepare() {
cd "${srcdir}"
# Upstream would prefer we *manually* set this env var when using the
# build option "-DINSTALL_BUNDLED_DICTS=0"
patch -p1 < ../0001-Set-environment-variable-for-Sigil-dictionaries.patch
if [[ "${_localepurge}" != "" ]]; then
for trans in src/Resource_Files/ts/*; do
if [[ "$(basename $trans | sed -r 's/(_.*)_.*/\1/g')" != "sigil_${_localepurge}" ]]; then
rm $trans
fi
done
fi
}
2011-01-09 22:14:51 +08:00
build() {
2016-02-23 02:34:30 +08:00
cd "${srcdir}"
2012-11-01 02:29:55 +08:00
2013-09-08 17:53:58 +08:00
mkdir -p build
cd build
2016-02-23 02:34:30 +08:00
cmake -G "Unix Makefiles" \
-DINSTALL_BUNDLED_DICTS=0 \
2011-08-27 04:11:01 +08:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS:STRING="$CFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \
2011-08-27 04:11:01 +08:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON ..
make
2011-08-27 04:11:01 +08:00
}
2011-01-09 22:14:51 +08:00
2011-08-27 04:11:01 +08:00
package() {
2016-02-23 02:34:30 +08:00
cd "${srcdir}/build"
2015-04-28 05:01:18 +08:00
2014-11-24 07:38:55 +08:00
make DESTDIR=$pkgdir install
2015-04-28 05:01:18 +08:00
2016-02-23 02:34:30 +08:00
install -Dm0644 $srcdir/src/Resource_Files/freedesktop/$pkgname.desktop \
2015-04-28 05:01:18 +08:00
$pkgdir/usr/share/applications/$pkgname.desktop
2011-01-09 22:14:51 +08:00
for _pic in 16 32 48 128 256; do
2016-02-23 02:34:30 +08:00
install -Dm0644 ../src/Resource_Files/icon/app_icon_$_pic.png \
2015-05-01 00:04:39 +08:00
$pkgdir/usr/share/icons/hicolor/${_pic}x${_pic}/apps/$pkgname.png
2011-01-09 22:14:51 +08:00
done
2016-02-23 02:34:30 +08:00
install -Dm644 ../src/Resource_Files/icon/app_icon_512.png \
2012-11-01 02:29:55 +08:00
"$pkgdir/usr/share/pixmaps/$pkgname.png"
2016-02-23 02:34:30 +08:00
python3 -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
python3 -O -m compileall "${pkgdir}"/usr/share/sigil/{plugin_launchers/python/,python3lib}
2011-01-09 22:14:51 +08:00
}