void-packages/srcpkgs/hunspell-pt_PT-preao/template

51 lines
1.4 KiB
Bash

# Template file for 'hunspell-pt_PT-preao'
pkgname=hunspell-pt_PT-preao
version=20220621
revision=3
short_desc="Pre-1990 Portuguese dictionary for hunspell"
maintainer="Luis Henriques <henrix@camandro.org>"
license="GPL-2.0-only, LGPL-2.1-only, MPL-1.1"
homepage="https://natura.di.uminho.pt/wiki/doku.php?id=dicionarios:main"
distfiles="https://natura.di.uminho.pt/download/sources/Dictionaries/hunspell/${pkgname}-${version}.tar.gz"
checksum=ddfe261e867f0c5489ec06f2d83f390b28e9631d667e88a33670b6ce755b4cf5
provides="hunspell-pt_PT-0.1_1"
replaces="hunspell-pt_PT>=0"
build_options="bdic"
desc_option_bdic="Enable Chromium's bdic format"
if [ "$XBPS_WORDSIZE" = 64 ]; then
hostmakedepends="qt6-webengine"
build_options_default="bdic"
else
case "$XBPS_MACHINE" in
i686*)
hostmakedepends="qt5-webengine"
build_options_default="bdic"
;;
esac
fi
if [ "$build_option_bdic" ]; then
depends="hunspell-qtwebengine-dict"
fi
do_build() {
PATH="/usr/lib/qt6/libexec:/usr/lib/qt5/bin:$PATH"
if [ "$build_option_bdic" ]; then
qwebengine_convert_dict pt_PT-preao.dic \
pt_PT.bdic
fi
}
do_install() {
vinstall pt_PT-preao.aff 644 usr/share/hunspell
vinstall pt_PT-preao.dic 644 usr/share/hunspell
ln -s pt_PT-preao.aff "${PKGDESTDIR}/usr/share/hunspell/pt_PT.aff"
ln -s pt_PT-preao.dic "${PKGDESTDIR}/usr/share/hunspell/pt_PT.dic"
if [ "$build_option_bdic" ]; then
vinstall pt_PT.bdic 644 usr/share/hunspell-bdic
fi
vdoc README_pt_PT.txt
}